- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- restarting script running as a cron job
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
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
тАО01-04-2006 05:52 PM
тАО01-04-2006 05:52 PM
Regards,
Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-04-2006 06:05 PM
тАО01-04-2006 06:05 PM
Re: restarting script running as a cron job
Use this commands below :
To stop cronjob :
# /sbin/init.d/cron stop
To start cronjob :
# /sbin/init.d/cron start
Hope this information can help you.
Cheers,
AW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-04-2006 06:35 PM
тАО01-04-2006 06:35 PM
Re: restarting script running as a cron job
In Oracle, the DBMS_JOB/DBMS_SCHEDULER package automatically re-runs the jobs that have been missed, but cron cannot.
Unfortunately, cron does not automatically re-run jobs that have not been executed due to reboot or some other reasons!
You will have to reschedule the execution (using cron itself then disable it) or run the script manually.
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-04-2006 06:36 PM
тАО01-04-2006 06:36 PM
SolutionYou have a script that has been scheduled through cron. what frequency is the job scheduled to run for. is is every day at a certain time. In that case then if today it did not run then it will be run next day.
But if you want the script to run every day
and you want to make sure the job has run, then check for the output file or text in the directory when the job is run. If there is no output, then check for the job log. If this log or the output file is not generated then call the script again. By this you will make sure that the job is run.
IA
IA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-04-2006 06:38 PM
тАО01-04-2006 06:38 PM
Re: restarting script running as a cron job
if your job is run via cron it will be restartet every configured time, whatever reason let it stop.
Do you need your script running permanently and to be restarted immediatly after termination? Then have a look at init(1) and inittab(4) manpages.
rgds
HGH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-04-2006 07:29 PM
тАО01-04-2006 07:29 PM
Re: restarting script running as a cron job
in the crontab just redirect the output to one file.
( or just redirect the exit code to some files )
after that by verfiying the file u can find out the script stoped or completed successfully
regards
tvs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-04-2006 09:05 PM
тАО01-04-2006 09:05 PM
Re: restarting script running as a cron job
it seems you need redirection for to control a job which is ruuning from cron successfully or not!!!
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=883485
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=901517
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=127181
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=22050
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=800553
Good Luck,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-04-2006 09:15 PM
тАО01-04-2006 09:15 PM
Re: restarting script running as a cron job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2006 03:42 AM
тАО01-05-2006 03:42 AM
Re: restarting script running as a cron job
#>at now script
#>man at #for more detail
H
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2006 05:13 AM
тАО01-05-2006 05:13 AM
Re: restarting script running as a cron job
Redirect the stderr to a file and you are done.
You can know how the crontab job is performing , later by seeing the errlog.
It should be look like this:
#Run LogLooker security reports daily
32 15 * * * /usr/local/bin/loglooker/sad.sh -a -m root > /myhome/err.log 2>&1
hth,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2006 03:42 PM
тАО01-05-2006 03:42 PM
Re: restarting script running as a cron job
http://www.unixgeeks.org/security/newbie/unix/cron-1.html
http://www.adminschoice.com/docs/crontab.htm
-Arun