How do I schedule a Squid restart on NetBSD for example at 7:00am?
You could set up a cron job run at some point in the day.
command i believe is /etc/init.d/squid restart
Edit: well it appears i was right, just too slow ... (thanks for confirming that though david)
I cant test it, but if that command dont work try /etc/rc.d/init.d/squid restart
Last edited by EduTech; 25th February 2009 at 10:21 AM.
Looks like mine is a little too Bespoke. /etc/init.d does exist for a start.
Currently my cron looks like this:
# $NetBSD: cron,v 1.6 2004/08/13 18:08:03 mycroft Exp $
# PROVIDE: cron
# REQUIRE: LOGIN
# KEYWORD: shutdown
$_rc_subr_loaded . /etc/rc.subr
Do you know where/what I have to do to add that in and get it to run at a specified time? Sorry I'm really now well versed in *nix
No I meant how do you get the cron job to start up at at specified time?
To edit the cron schedual (do this as root user, or use sudo):
And add something along these lines to the end of the file:
0 7 * * * /etc/rc.d/squid restart
You might want to check the man page for the commands above - "man cron" and "man crontab" should get you all you need to know.
Last edited by dhicks; 25th February 2009 at 01:59 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)