- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Crontab Help!
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2003 06:33 AM
08-12-2003 06:33 AM
Crontab Help!
01 21 * * 1-5 /rims/site1/prod1/posftp.sh
Could anyone tell my what is wrong with this crontab entry? The scripts execute properly if started manually, but not if waiting for the crontab. The script involves an FTP process.
Thank you,
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2003 06:39 AM
08-12-2003 06:39 AM
Re: Crontab Help!
You may want to post the script to see the script calling script details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2003 06:39 AM
08-12-2003 06:39 AM
Re: Crontab Help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2003 06:39 AM
08-12-2003 06:39 AM
Re: Crontab Help!
There are a few things you can check:
1) Check the mode bit of the script? Can it be executed by the owner of the crontab?
# ll /rims/site1/prod1/posftp.sh
2) Check the syslog /var/adm/syslog/syslog.log to see if the script was executed at 9:01PM last night.
3) If there was any error running the script, the crontab owner should receive email on it.
Hai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2003 06:40 AM
08-12-2003 06:40 AM
Re: Crontab Help!
check:
/var/adm/cron/cron.allow
and
/var/adm/cron/cron.deny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2003 06:51 AM
08-12-2003 06:51 AM
Re: Crontab Help!
The other thing to watch out for is that some commands expect to be running in an interactive environment (i.e. connected to a terminal) --- which cron ain't. You then have to make sure that you have handled i/o redirection properly. It is normally a bad idea to source a users .profile directly or invoke a su - user command from within cron but a plain old su user command is fine because in the latter case the .profile is not sourced. .profiles almost always have command like stty, tabs, ... which expect an interactive environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2003 07:16 AM
08-12-2003 07:16 AM
Re: Crontab Help!
One way to troubleshoot it initially is to put another script in the path of that script and try to login as the user and run it manually.
If the script in question is something that is okay to run during the day then simply run it by itself while logged in as the cron user and see if you get any errors.
The above ideas as well (cron.log) , cron.allow, etc are good places to check.
Also make sure that the commands INSIDE the script have full paths (i.e. instead of 'cat file', put in: '/sbin/cat file').
Best regards,
Kent M. Ostby
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2003 03:51 AM
08-13-2003 03:51 AM
Re: Crontab Help!
I have read all suggestions on troubleshooting this but nobody asked how the cron job was submitted. Did you simply edit the crontab?
Try logging in as the owner and do:
crontab
Cheers,
Mel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2003 04:03 AM
08-13-2003 04:03 AM
Re: Crontab Help!
Now this might sound really dumb, but is the date on your server correct? The crontab entry is set to run Mon thru Fri. If the day is Sat or Sun, it wont run.
Silly, but worth checking all the same.
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2003 04:08 AM
08-13-2003 04:08 AM
Re: Crontab Help!
Cron had to be closed and reopened.
But bby far the most probable cause is the lack of a proper environtment.
su -
cat /rims/site1/prod1/posftp.sh >> file1
mv file1 /rims/site1/prod1/posftp.sh
Massimo