LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 09-16-2004, 07:12 AM   #1
robbiemorgan
LQ Newbie
 
Registered: Aug 2003
Posts: 19

Rep: Reputation: 0
Cron not working


Hi all,

Cron isn't working on my box. Yet, if I type 'cron' I get:

cron: can't lock /var/run/cron.pid, otherpid may be 1696: Resource temporarily unavailable

Which I guess means it's running.

I'm running Suse 9.0 - any idea what could be the problem?

Thanks,

Rob
 
Old 09-16-2004, 07:15 AM   #2
cadj
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: LinuxMint Elyssa
Posts: 373

Rep: Reputation: 32
so the running cron process dosent work?
i have cron clean out my old tmp files once a week, i put my script in /etc/cron.weekly/ for cron to run it once a week.

is your problem that your cron.hourly or whatever isnt doing its task?
 
Old 09-16-2004, 07:16 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,806

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Why do you say it isn't working. Does top or ps show it running?
Script not working?
Post your script and any other error messages or information.
 
Old 09-16-2004, 08:00 AM   #4
robbiemorgan
LQ Newbie
 
Registered: Aug 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Hi,

I'm trying to get mrtg to run every five minutes. I've created a file 'mrtg' in '/etc/cron.daily' which contains the following:

0-59/5 * * * * root /usr/bin/mrtg /home/triple/public_html/mrtg.cfg

But it doesn't do anything. I've tried running the command from the command line and it works fine...

Output when I type 'ps -C cron':

PID TTY TIME CMD
1696 ? 00:00:00 cron

Do I need to restart cron?

Thanks,

Rob
 
Old 09-16-2004, 08:19 AM   #5
cadj
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: LinuxMint Elyssa
Posts: 373

Rep: Reputation: 32
did you make it executable?

if not

chmod +x mrtg
 
Old 09-16-2004, 08:32 AM   #6
robbiemorgan
LQ Newbie
 
Registered: Aug 2003
Posts: 19

Original Poster
Rep: Reputation: 0
I did:

chmod 0755 mrtg

Which I guess does the same thing, though I just tried your way and still no luck...

Thanks,

Rob
 
Old 09-16-2004, 10:47 AM   #7
robbiemorgan
LQ Newbie
 
Registered: Aug 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Figured out how to restart cron and it works.

Thanks guys,

Rob
 
  


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
simple cron job: not working Robert0380 Linux - Software 3 06-24-2008 04:45 AM
Cron not seeming to be working? MadCactus Red Hat 2 09-09-2006 11:31 AM
GPG cron job not working michredhat Linux - Software 1 12-07-2004 10:27 PM
Mysql Cron Script using select not working fallen Linux - General 2 11-04-2003 07:37 AM
Cron/at not working Wynd Linux - General 1 09-11-2003 11:22 PM


All times are GMT -5. The time now is 01:28 PM.

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