LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 11-20-2009, 03:10 PM   #1
SUSE-OES
LQ Newbie
 
Registered: Mar 2009
Posts: 5

Rep: Reputation: 0
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
 
Old 11-20-2009, 03:52 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD
Posts: 3,559
Blog Entries: 3

Rep: Reputation: Disabled
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..?
 
Old 11-20-2009, 04:30 PM   #3
SUSE-OES
LQ Newbie
 
Registered: Mar 2009
Posts: 5

Original Poster
Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron Job only runs when it is manually started sinister1 Linux - General 4 02-25-2008 09:35 AM
cron job runs but will not write to logfile c_curtis Linux - General 10 06-30-2006 10:25 AM
Cron Job Syntax for a task in seconds AJones Linux - Software 2 07-22-2005 01:56 PM
cron job only runs halfway aunquarra Linux - General 15 01-31-2005 05:53 PM
Why Does One Cron Job Runs Twice? cpope67 Programming 4 11-16-2004 07:09 AM


All times are GMT -5. The time now is 08:09 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration