LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-23-2012, 03:08 PM   #1
pratstercs
LQ Newbie
 
Registered: Sep 2012
Posts: 3

Rep: Reputation: Disabled
Cron not working


I have a Netgear Stora, and cron is not working, nor is cron.d.

I'm trying to run:
Code:
*/20 * * * * root /root/flexget-dev/bin/flexget --cron >> /flexget.log
I tried crontab -e and putting it in, that didn't work. I also have that in /etc/cron.d/flexget, which also doesn't run.
Running ps aux | grep cron gives:
Code:
root      1861  0.0  0.8   3408  1124 ?        Ss   20:26   0:00 crond
I also tried adding
Code:
*/20 * * * * root echo "hi" >> /flexget.log
to crontab and cron.d, also to no response.

Any help?
Thanks!

Last edited by pratstercs; 09-23-2012 at 03:23 PM.
 
Old 09-23-2012, 04:46 PM   #2
sackboy
LQ Newbie
 
Registered: Sep 2012
Posts: 20

Rep: Reputation: Disabled
Hi,

As the root user, try this:

crontab -e

Then add this:

*/20 * * * * echo "hi" >> /flexget.log

Not sure why you're adding the word "root" before the command.
 
Old 09-24-2012, 12:54 AM   #3
rosehosting.com
Member
 
Registered: Jun 2012
Location: Missouri, USA
Posts: 236

Rep: Reputation: 64
Quote:
Originally Posted by sackboy View Post
Not sure why you're adding the word "root" before the command.
because AFAIK that's the place for the 'user' who runs 'command'. look at the layout below:

Code:
#|   |   |   |   |  user command
#|   |   |   |  weekday (0-6) (Sunday=0)
#|   |   |   month (1-12)
#|   |   day (0-31)
#|   hour (0-23)
#minute (0-59)
OP, is there anything logged in your log files? Did you reload your cron?
 
Old 09-24-2012, 06:00 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Specifying the user is optional.
If not specified, the crontab's owner will be the user it runs as .
 
Old 09-24-2012, 12:47 PM   #5
pratstercs
LQ Newbie
 
Registered: Sep 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thumbs up

I've tried removing the root, and the "echo hi" command seems to work and add it to the log file like I wanted. Just tested, and it all works now. Thanks!

However, why would having the username there stop it from running; as said before, it should be optional?

Last edited by pratstercs; 09-24-2012 at 01:02 PM.
 
Old 09-24-2012, 09:37 PM   #6
sackboy
LQ Newbie
 
Registered: Sep 2012
Posts: 20

Rep: Reputation: Disabled
Hi,

Were you putting this in root user's cron?

Last edited by sackboy; 09-24-2012 at 09:38 PM.
 
Old 09-25-2012, 06:52 AM   #7
pratstercs
LQ Newbie
 
Registered: Sep 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sackboy View Post
Hi,

Were you putting this in root user's cron?
Yeah, I only use root on the machine (bad practise, I know, but still) so I used root's crontab. I also tried cron.d, and it didn't work with "root [command]" there either.
 
  


Reply



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
[SOLVED] Script not working in cron but working fine manually jasperux Linux - Newbie 2 07-04-2012 11:28 PM
/USR/SBIN/CRON --> Suspicious Capital Letter, cron is not working??? arfal Linux - Server 10 06-22-2012 06:40 AM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
cron.daily, cron.weekly not working mwhite74 Linux - Server 2 06-07-2007 09:51 AM
cron not working from crontab nor form /etc/cron/cron.d. What did SuSE change? JZL240I-U SUSE / openSUSE 11 01-04-2007 01:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:05 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
Open Source Consulting | Domain Registration