View previous topic :: View next topic |
Author |
Message |
wylde342 Tux's lil' helper
Joined: 09 Apr 2004 Posts: 78
|
Posted: Wed Mar 23, 2005 3:15 pm Post subject: Cron status? |
|
|
How can I see if a cron job I added is running/worked whatever? I've got syslog-ng installed...but I don't see any log for it? |
|
Back to top |
|
|
befortin Apprentice
Joined: 10 Feb 2004 Posts: 193
|
Posted: Wed Mar 23, 2005 3:16 pm Post subject: |
|
|
What's the Code: | grep cron /var/log/messages | output? |
|
Back to top |
|
|
wylde342 Tux's lil' helper
Joined: 09 Apr 2004 Posts: 78
|
Posted: Wed Mar 23, 2005 3:19 pm Post subject: |
|
|
date time hostname crontab[pid] (root) BEGIN EDIT (root)
its about 10 lines of this. I have a job that is supposed to be running 5 * * * * and I don't see it running? |
|
Back to top |
|
|
befortin Apprentice
Joined: 10 Feb 2004 Posts: 193
|
Posted: Wed Mar 23, 2005 3:27 pm Post subject: |
|
|
Is your cron file set to +x? And what's the content of this file?
Here's the kind of logs I have in my /var/log/messages :
Code: | Mar 5 15:30:01 srv1 /usr/sbin/cron[16713]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Mar 5 15:40:01 srv1 /usr/sbin/cron[16725]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Mar 5 15:50:01 srv1 /usr/sbin/cron[16737]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons ) |
|
|
Back to top |
|
|
wylde342 Tux's lil' helper
Joined: 09 Apr 2004 Posts: 78
|
Posted: Wed Mar 23, 2005 3:38 pm Post subject: |
|
|
Well, I use "crontab -e" as root for this script I'm trying to get working. How do I +x that file...I can't find it? |
|
Back to top |
|
|
befortin Apprentice
Joined: 10 Feb 2004 Posts: 193
|
Posted: Wed Mar 23, 2005 3:42 pm Post subject: |
|
|
What's the content of your file? |
|
Back to top |
|
|
wylde342 Tux's lil' helper
Joined: 09 Apr 2004 Posts: 78
|
Posted: Wed Mar 23, 2005 3:49 pm Post subject: |
|
|
penguin root # crontab -e
#!/bin/bash
5 * * * * sh /usr/local/MPP/clamavupdate.sh |
|
Back to top |
|
|
59729 Apprentice
Joined: 21 Jun 2004 Posts: 279
|
Posted: Wed Mar 23, 2005 4:01 pm Post subject: |
|
|
You should be able to add files to your crondirs thats what the run script does check for crons I think
/etc/
cron.daily
cron.hourly
cron.monthly
cron.weekly |
|
Back to top |
|
|
wylde342 Tux's lil' helper
Joined: 09 Apr 2004 Posts: 78
|
Posted: Wed Mar 23, 2005 4:06 pm Post subject: |
|
|
Cool, I'll try that.
One more thing, how can I set my editor permanately? For instance, when I type "crontab -e" I get an error that makes me have to type "export editor=vim"
Thanks for all your help on this one! |
|
Back to top |
|
|
befortin Apprentice
Joined: 10 Feb 2004 Posts: 193
|
Posted: Wed Mar 23, 2005 4:12 pm Post subject: |
|
|
Set the EDITOR= in /etc/rc.conf |
|
Back to top |
|
|
|