You are not logged in.

#1 2005-05-26 14:09:53

mmgm
Member
From: Israel
Registered: 2005-05-26
Posts: 52
Website

Goddamn cron!

I wrote a little script that reads the NForce RSS feed and notifies me with a little dialog box when they include the string "GTA" (cos I just can't wait).
On its own the script works perfectly fine and I've created a symlink under /usr/bin so that `search-nforce` runs my script.
However, I just can't get it to run as a cronjob.

[omri@Dean ~]$ crontab -l
*/5 * * * * "search-nforce nforce"

The additional parameter I pass to my script tells it to look for "nforce", instead of the default "GTA" inside the RSS feed, so that it's bound to succeed. I've also set it to run every 5 minutes for now (or so I've tried) so I can see if it works without waiting too long.
It just doesn't seem to do anything.

Please help!

Offline

#2 2005-05-26 14:12:54

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: Goddamn cron!

Did you try with

*/5 * * * * /usr/bin/search-nforce nforce

? I noticed cron doesn't like relative filenames. If your script contains commands, make sure the full path is included aswell.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#3 2005-05-26 14:24:25

mmgm
Member
From: Israel
Registered: 2005-05-26
Posts: 52
Website

Re: Goddamn cron!

FUBAR wrote:

Did you try with

*/5 * * * * /usr/bin/search-nforce nforce

? I noticed cron doesn't like relative filenames. If your script contains commands, make sure the full path is included aswell.

Still isn't working.
sad

Edit: Apparently I have a syntax error;

[omri@Dean ~]$ crontab -l
*/5 * * * * /usr/bin/search-nforce nforce >>/home/omri/cron/log 2>&1
[omri@Dean ~]$ cat /home/omri/cron/log
Syntax error

I'm completely lost here, what the hell am I doing wrong?

Offline

#4 2005-05-26 16:11:49

Kern
Member
From: UK
Registered: 2005-02-09
Posts: 460

Re: Goddamn cron!

first have you got crond running ? ps ax |grep cron or check
/etc/rc.conf DAEMONS line

second, how have you edited the crontab file ? crontab -e or manually.

also, have you tried running the script by placing it in the cron hourly dir, and modifying the cron hourly line to run every 5 mins

*/5 * * * *  /usr/sbin/run-cron /etc/cron.hourly

also check

less /var/spool/cron/omri   or whatever users name is. see if its scheduled.

Offline

#5 2005-05-26 17:28:27

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: Goddamn cron!

I had a problem running cronjobs as user too. The only way I was able to solve it was to restart the daemon (/etc/rc.d/cron restart) once my user was logged in. I don't know if it will work for you but,  maybe its worth trying.

Offline

#6 2005-05-26 18:48:43

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: Goddamn cron!

weird. I have had no problems running cron as a user...


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

Board footer

Powered by FluxBB