Jump to content

Recommended Posts

Posted
How do I schedule a Squid restart on NetBSD for example at 7:00am?

 

Just get cron to run "/etc/init.d/squid restart" at 7am every day.

 

--

David Hicks

Posted (edited)

You could set up a cron job run at some point in the day.

 

command i believe is /etc/init.d/squid restart

 

James.

 

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

Edited by EduTech
Posted

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

 

name="cron"

rcvar=$name

command="/usr/sbin/${name}"

pidfile="/var/run/${name}.pid"

 

load_rc_config $name

run_rc_command "$1"

 

 

 

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

 

 

Wes

Posted
You could set up a cron job run at some point in the day.

 

command i believe is /etc/init.d/squid restart

 

James.

 

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

 

 

Wes dont you read ;) you must sort your eye's out lol :p

 

James.

Posted (edited)
how do you get the cron job to start up at at specified time?

 

Handily cribbed from Webman's post to the "Backing up Zimbra" thread:

 

To edit the cron schedual (do this as root user, or use sudo):

 

crontab -e

 

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.

 

--

David Hicks

Edited by dhicks
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...