- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Crontab doesn't execute a new script...
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
Discussions
Discussions
Forums
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
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
тАО07-17-2002 04:36 AM
тАО07-17-2002 04:36 AM
Crontab doesn't execute a new script...
I've been a problem with contrab.I've a crontab entry that had 4 scripts runnning fine.I needed add a new script but it's doesn't work anyway.The changes was made from crontab -e.
I've tested the script manualy and it works fine.
Some help would be very appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2002 04:42 AM
тАО07-17-2002 04:42 AM
Re: Crontab doesn't execute a new script...
what is your crontab entry?
do you know if cron start the script and then it fail or the script is never run?
If the script is run it's possible that you could execute your script manually and when the script is executed in cron it will fail. The reason is that cron will not read your .profile file and all the environment variables (like PATH) won't be define. so you should make sure that you always use full path for your commands inside your script.
Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2002 04:43 AM
тАО07-17-2002 04:43 AM
Re: Crontab doesn't execute a new script...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2002 04:45 AM
тАО07-17-2002 04:45 AM
Re: Crontab doesn't execute a new script...
i think you are perhaps missing the path to your script so the shell can't find it. Try the following:
0 * * * * /path/to/your/script
or you could edit your /etc/PATH file:
vi /etc/PATH --> A (append at end of line)
:/path/to/your/script/directory
ESC
:wq!
after this you have to relogin to get it to work.
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2002 04:47 AM
тАО07-17-2002 04:47 AM
Re: Crontab doesn't execute a new script...
you can look at /var/adm/cron/log to see if the script is executed. But i agree with Luc that it must be a problem with the env variables, like PATH, SHELL...You migth set them at the begining of the script.
Best regards
Juan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2002 04:48 AM
тАО07-17-2002 04:48 AM
Re: Crontab doesn't execute a new script...
ensure at the end of your new entry you have 2>&1 to redirect stderr and stdout
Also, you generally shouldn't need to stop and start cron because of the way you have added your entry via crontab -e. Give it a go and reset cron
/sbin/init.d/cron stop
/sbin/init.d/cron start
Check the permissions on your new script with regard to the cron user if not root
Please post the crontab file
HTH
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2002 04:53 AM
тАО07-17-2002 04:53 AM
Re: Crontab doesn't execute a new script...
is you cron daemon running? If yes, there shold be messages about the execution of the scripts in /var/adm/cron/log
Any clues there?
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2002 04:54 AM
тАО07-17-2002 04:54 AM
Re: Crontab doesn't execute a new script...
the standard output and standard error for cron is the mail account of the user which run the cron job. Perhaps your script *has* been executed but you do not see the results/output?
Look into your mail account to verify this.
you have to redirect the output of your script if you want to see it:
0 * * * * /path/to/script 1>/dev/pts/0 2>&1
--> would redirect your scripts output to a terminal, also error message is redirected there.
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2002 05:57 AM
тАО07-17-2002 05:57 AM
Re: Crontab doesn't execute a new script...
Regards !
Halan Leno
Brazil - Sao Paulo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2002 06:06 AM
тАО07-17-2002 06:06 AM
Re: Crontab doesn't execute a new script...
the entry in your cronfile seems to be ok. Did you have a look to the mail account of the user sybase? Can you please post your script here to find out if the error is in script code? Perhaps the script needs some parameters which are used inside it?
Allways stay on the bright side of life!
Peter