Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cron- Crontab (I seached, and just cannot figure this out!)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Netdale
n00b
n00b


Joined: 25 May 2002
Posts: 67
Location: Lancaster, Pa

PostPosted: Fri Oct 04, 2002 1:16 am    Post subject: Cron- Crontab (I seached, and just cannot figure this out!) Reply with quote

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
View user's profile Send private message
c_kuzmanic
Guru
Guru


Joined: 18 Apr 2002
Posts: 488
Location: Los Angeles , California

PostPosted: Fri Oct 04, 2002 10:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Mpemba Effect
Apprentice
Apprentice


Joined: 18 Sep 2002
Posts: 156

PostPosted: Fri Oct 04, 2002 2:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
tore-
n00b
n00b


Joined: 30 Sep 2002
Posts: 32

PostPosted: Fri Oct 04, 2002 2:56 pm    Post subject: Reply with quote

http://www.superscripts.com/tutorial/crontab.html
Back to top
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Fri Oct 04, 2002 3:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Fri Oct 04, 2002 9:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Netdale
n00b
n00b


Joined: 25 May 2002
Posts: 67
Location: Lancaster, Pa

PostPosted: Sat Oct 05, 2002 4:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Netdale
n00b
n00b


Joined: 25 May 2002
Posts: 67
Location: Lancaster, Pa

PostPosted: Sun Oct 06, 2002 4:52 pm    Post subject: Reply with quote

Delta??

Dale
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Sun Oct 06, 2002 6:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Sun Oct 06, 2002 11:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum