You are not logged in.
Pages: 1
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
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
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.
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
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
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
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
Pages: 1