LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Cron stops openSuse 10.2 (https://www.linuxquestions.org/questions/linux-software-2/cron-stops-opensuse-10-2-a-4175420732/)

Rich Thomson 08-06-2012 09:05 PM

Cron stops openSuse 10.2
 
openSuse 10.2. chkconfig has cron "on". Boot the system, service cron status shows "unused". service cron start shows "running". exit out of root, su back in, service cron status shows "unused" again. Same problem on hundreds of systems (because all from the same image, naturally). Not sure if it was always this way or if I just noticed it. With this version of the O/S it is cron, instead of crond. google searches not enlightening. ideas to pursue?

Resolved - 10.2 does not support the @reboot option.

unSpawn 08-08-2012 08:07 AM

Quote:

Originally Posted by Rich Thomson (Post 4747671)
Resolved - 10.2 does not support the @reboot option.

Then it must be cronie or something as Vixie-cron does support it. BTW you could probably emulate "@reboot" using /etc/rc.d/rc.local by adding a line
Code:

/usr/lib/cron/run-crons &
if you want to run all cronjobs (though that would be odd) or
Code:

/path/to/jobfile &
if you just want to run a single job or
Code:

/usr/bin/at -f /path/to/jobfile now
if you have the "at" service running at boot and prefer handing it off that way. If you use /etc/rc.d/rc.local across different SuSE versions and releases then you could prefix a check so this only affects 10.2 this way
Code:

grep -q -m1 '.10\.2' /etc/issue /etc/*release && /usr/bin/at -f /path/to/jobfile now
HTH

Rich Thomson 08-09-2012 07:20 AM

Thanks for the tips, I'll try those. Turns out the problem isn't cron @reboot, it's something in the job that turns cron off. I'll figure that out.


All times are GMT -5. The time now is 06:45 AM.