LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   CRON job runs, but doesn't perform the task (https://www.linuxquestions.org/questions/suse-opensuse-60/cron-job-runs-but-doesnt-perform-the-task-770491/)

SUSE-OES 11-20-2009 02:10 PM

CRON job runs, but doesn't perform the task
 
This is on Suse (SLES10sp2)

I logged in as root and created a cron job to restart a service every 5 minutes:

*/5 * * * * rc(servicename) restart <parameters>

if I turn on logging by adding this line, I see the log file being created and an entry appended every minute, but the service never restarts:

* * * * * date >> /tmp/cron_test.txt

What am I missing??

Thx

DG

anomie 11-20-2009 02:52 PM

IIRC, suse uses rc<service> to somehow alias to /etc/init.d/<service>.

Just use the fully qualified path in your cronjob.

---

P.S. What service are you restarting every 5 minutes..?

SUSE-OES 11-20-2009 03:30 PM

Doh! Thanks, that did it. I'm (obviously) new to Linux, moving there from another platform. The service being restarted is a web font-end for Tomcat-- we are doing some testing and it's easier to have it restart itself when we break it....
:^)

Thanks!

DG


All times are GMT -5. The time now is 07:33 AM.