Quote:
|
Originally Posted by philipo
Hello everyone
In slackware, how do I configure a script to run 2 times a day at a specified time? I am planning to make a back-ups of the files... And I need to know how I can schedule the server to do it 2 times a day.
Thanks.
Philip
|
Hi,
Look at /etc/cron.daily, /etc/cron.hourly, /etc/cron.monthly, or /etc/cron.weekly depending on your needs. You could setup a cron job to your specifics. Do a 'man crontab' to understand the cron jobs.
Here is an example for time on one of my servers;
Code:
amos:/etc/cron.hourly# cat /etc/cron.hourly/time_amos |less
#!/bin/sh
#10-09-06 08:30 gws
#update time on amos via time.mtco.com
#
#11-06-06 gws change to pool
/usr/sbin/ntpdate -v 0.us.pool.ntp.org ntp-1.mcs.anl.gov ntp-2.mcs.anl.gov &&hwclock --systohc
This uses the /etc/cron.hourly directory. This script is run on the hour. Note that the file must be executable;
Code:
ls -al
-rwxr-xr-x 1 root root 243 2007-06-22 16:53 time_amos*
If you do a search on the Slackware forum you will get a lot of threads relative to your needs for cron.