Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cron does not run well

Status
Not open for further replies.

lems

Programmer
Feb 13, 2003
1
US
hi,
ineed help for my crontab.
my os is aix 4.3.3 .
when i modify the crontab it stop to execute programs inside. to pass over the trouble i kill the cron process and a another is created. at this moment the program in the crontab begin to run well.
Do you a another solution less radical.
thanks
 
Not sure what you are really asking...Below is a document on cron and crontab
maybe it will help...Usually you do a crontab -e to edit the cronfiles...if you don't want something to run right away, you set a time that has passed....

Cron in inittab is set to respawn...so if it dies it restarts...
you can do the telenit q to restart it also....



Perhaps if I had more info on what you are concerned about?
 
what i feel the best way is ...

here instead of killing the cron. first check for any jobs currently running. if not there modify the entry in /etc/inittab for cron:2:respawn:/usr/sbin/cron to cron:2:stop:/usr/sbin/cron
then reread it #telinit q
(here we are safely stoping the deamon)
modify the crontab file by using #crontab -l >/tmp/cronfile
then edit using 'vi'. submit the same #crontab /tmp/cronfile.

again put back the entry in /etc/inittab for cron as 'respawn' and then reread #telinit q
(here we are starting the deamon)

bye
nagaraj
 
If you modify crontab with crontab -e, you have a couple of advantages. First, if you make a typo and the format of the entry you are adding or modifying is not correct, you will be warned that the formatting was incorrect and the changes won't be written to the file.

And second, using crontab -e forces the system to reread the crontab file to pick up the new entry so you don't have to stop and restart the cron daemon.

Re-running the inittab seems a bit of overkill when all you want to do is change cron.
 
For years now on various Unix servers we have totally removed the use of cron from the systems.

Instead we use a fantastic batch scheduling system known as bq+ -
This system allows jobs to be scheduled on a customisable basis - ie you can create your own schedules for jobs, and also supports job dependancies.

It is the best scheduling system I've used on a Unix platform - and is supported across all platforms, and is Free for Linux.

CHeers

AK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top