- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- cron job not working!
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-21-2001 07:07 AM
08-21-2001 07:07 AM
cron job not working!
I have added the time and script path into the crontab file and the script works when it is run manually - it is being run as root.
I have no idea why it is not working can anyone help
Thanks
Mark.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2001 07:16 AM
08-21-2001 07:16 AM
Re: cron job not working!
First thing to do is to check the cron logs in
/var/adm/cron/log
is anything being written in that log. If 'no' check if cron is running
ps -ef | grep cron
If log is being written, you may not be setting the environment in your script. Cron does not login when running a script so all the setting we generally do in .profile will not be set. So all the environment setting need to be explicitly done in your script.
And if cron is not running, set the value of parameter cron to 1 in /etc/rc.config.d/cron and run the script /sbin/init.d/cron as
/sbin/init.d/cron start
This will start the cron daemon.
Hope this helps.
...BPK...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2001 07:19 AM
08-21-2001 07:19 AM
Re: cron job not working!
A few things to look for:
. Check the cron has re-read the update crontab file.
. Check the /var/adm/cron/log for any exit code (rc=nnn)
. Check root's mailbox for any error messages.
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2001 07:20 AM
08-21-2001 07:20 AM
Re: cron job not working!
Thanks again
Mark.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2001 07:22 AM
08-21-2001 07:22 AM
Re: cron job not working!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2001 08:03 AM
08-21-2001 08:03 AM
Re: cron job not working!
Just a thought in mind. Have u given full path name for the script in the cron job? If not try with full path name.
eg:0 5 * * 0-6 /application/action/bin/aSYbdf.ksh
This cron job everyday morning at 5. The scripts full path is given
Hope this may help u.
Regards
Joe.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2001 10:04 AM
08-21-2001 10:04 AM
Re: cron job not working!
Try executing your profile file as first instruction in your crontab script like :
. /home/.../.profile
This will set all environment variables that you need. When a cron is launched, only four or five environment variables are set.
Just to verify :
create a dummy crontab script and add only one line in it : with the "env" command.
type the same command "env" online and compare, the difference will explains why your crontab script is not running.
Magdi