View previous topic :: View next topic |
Author |
Message |
Netdale n00b
Joined: 25 May 2002 Posts: 67 Location: Lancaster, Pa
|
Posted: Fri Oct 04, 2002 1:16 am Post subject: Cron- Crontab (I seached, and just cannot figure this out!) |
|
|
Alright, here's the deal......I'm trying to run analog every morning @ 3:30
nano /etc/crontab
Code: |
# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
#
*/15 * * * * test -x /usr/sbin/run-crons && /usr/sbin/run-crons
0 0 * * * rm -f /var/cron/lastrun/cron.daily
0 0 * * 6 rm -f /var/cron/lastrun/cron.weekly
0 0 1 * * rm -f /var/cron/lastrun/cron.monthly
30 3 * * * root /etc/analog/dailyscript >> /home/weaverda/cron |
Yet the script refused to work..........I mean it wont run. I can manually run it in bash....
Here is the script
Code: |
#!/bin/sh
cd /usr/local/analog/
./analog -G +g/etc/analog/weavweb.net
./analog -G +g/etc/analog/mtwebteam.net
./analog -G +g/etc/analog/mtcrew.net
./analog -G +g/etc/analog/ftpd
./analog -G +g/etc/analog/base
./analog -G +g/usr/local/analog/analog.cfg
|
One more thing.....I've been just testing it w/ 14 21 * * * root, to see if it runs. Would that have any bearing on it??
Any Ideas??? Thanks Dale |
|
Back to top |
|
|
c_kuzmanic Guru
Joined: 18 Apr 2002 Posts: 488 Location: Los Angeles , California
|
Posted: Fri Oct 04, 2002 10:26 am Post subject: |
|
|
Hi;
Usually, cronscripts (or rather symlinks to them) belong into the respective folders cron.daily, cron.monthly etc.
All my cronscripts are contained in those folders and have always worked fine. Give it a try and see if it works. |
|
Back to top |
|
|
Mpemba Effect Apprentice
Joined: 18 Sep 2002 Posts: 156
|
Posted: Fri Oct 04, 2002 2:16 pm Post subject: |
|
|
Can you execute any cron job? check top if you have cron running. If not and vcron is not in default run level add it with the usual
Code: |
rc-update add vcon default
|
|
|
Back to top |
|
|
tore- n00b
Joined: 30 Sep 2002 Posts: 32
|
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Fri Oct 04, 2002 3:43 pm Post subject: |
|
|
Yes you need to add cron to the run level via etc-update. You also need to start it up. Assuming you use vcron:
Code: | /etc/init.d/vcron start |
If you don't use vcron just substitue "vcron" with whatever cron you use. |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Fri Oct 04, 2002 9:45 pm Post subject: |
|
|
rizzo wrote: | Yes you need to add cron to the run level via etc-update. |
That'd be rc-update...
Anyway, be sure to `killall -HUP vcron` after modifying /etc/crontab (assuming you you vcron). _________________ I don't believe in witty sigs. |
|
Back to top |
|
|
Netdale n00b
Joined: 25 May 2002 Posts: 67 Location: Lancaster, Pa
|
Posted: Sat Oct 05, 2002 4:39 pm Post subject: |
|
|
Delta407 -- do I have to that everytime I make a change to it?? Cause its now working.........
(when i do it I get the following.........
Code: |
root@68 # killall -HUP vcron
vcron: no process killed |
Thanks.......Dale |
|
Back to top |
|
|
Netdale n00b
Joined: 25 May 2002 Posts: 67 Location: Lancaster, Pa
|
Posted: Sun Oct 06, 2002 4:52 pm Post subject: |
|
|
Delta??
Dale |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Oct 06, 2002 6:22 pm Post subject: |
|
|
It looks to me from the cron manpage that vcron looks at modtimes when it wakes up every minute, and so HUPping it should not be necessary. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Sun Oct 06, 2002 11:04 pm Post subject: |
|
|
Right, it does refresh the crontab automatically. However, if you set it to trigger the next minute, the man page doesn't define its behavior; so, it might be a good idea to HUP it. _________________ I don't believe in witty sigs. |
|
Back to top |
|
|
|