LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-06-2007, 03:59 AM   #1
sheek
LQ Newbie
 
Registered: Jul 2003
Posts: 10

Rep: Reputation: 0
Cron will not start


Hi guys,
I"m trying to start cron and get this error:

@dell: /etc/init.d >cron restart

* Restarting periodic command scheduler crond cron: 45: start-stop-daemon: not found
cron: 45: start-stop-daemon: not found [fail]

I made sure the location of the start-stop-daemon is added in the PATH
here is my crontab contents


SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#


My start start-stop-daemon is in /sbin

Can anyone help please?

Last edited by sheek; 10-06-2007 at 05:50 AM.
 
Old 10-07-2007, 01:17 PM   #2
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 97
First check that start-stop-daemon is being found:
Code:
type start-stop-daemon
Assuming you have already done this, you could modify /etc/init.d/cron to prefix start-stop-daemon with /sbin/ this would stop it searching, and ensure it goes to /sbin to run it

(I know this is not an ideal solution but it should resolve the immediate issue)

BTW in my experience there are only six parameters in a crontab file:
  1. minute
  2. hour
  3. day of month
  4. month
  5. day of week
  6. command

Whenever I need to run a command as another user, I tend to start the command with /bin/su - {user} -c {command}
 
Old 10-09-2007, 04:52 AM   #3
sheek
LQ Newbie
 
Registered: Jul 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Cron

For some reason cron couldn't find my start-stop-daemon..added the location of the daemon../sbin/start-stop-daemon in cron ..that fixed the issue.
thanks Disillusionist.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot start cron; FIFO exists deverest Solaris / OpenSolaris 17 04-14-2008 10:55 AM
Cron will not start back up after stop RaelOM Linux - Software 3 12-15-2006 01:53 PM
Using Cron to start software on reboot Azalar Linux - Newbie 3 01-12-2006 05:41 AM
How do I start graphical applications via cron? p0ser Linux - Software 7 01-21-2005 03:44 PM
Using cron to start a program at reboot ? s&j Linux - General 2 06-22-2002 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:46 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration