1. Create a shell script which updates your virus definitions. Test it
to make sure it works.

2. Check if you have a directory called /etc/cron.weekly. If you do,
then the easiest way to add a weekly job is to plonk the shell script
from #1 in that directory. There's also cron.monthly, cron.daily etc.
depending how frequent you want it.

that's all... unless you want more precise control:

3. If you want more precise control, for instance specifying exactly
which day of the month or week you want it to run in, create a cron
entry. To do this, login as whichever user has permissions to update the
virus database (probably root), then type "crontab -e". If this is the
first time you're running it, it will create the crontab file. In this
file, add a single line:
0 8 * * *     /usr/bin/update-viruses
In the above line, I'm assuming that the shell-script to update the
viruses is called /usr/bin/update-viruses. Change it to your
virus-updating script.
The first part consists of the minutes, hours, day-of-month, month and
day-of-week. So, in the above line I'm telling it to execute the script
at 8 am (minutes=0, hours=8) of any day, month or weekday. To make it
run only on the first of each month at midnight, do the following:
0 0 1 * *     /usr/bin/update-viruses
...and to run at 8.30pm every saturday, do this:
30 20 * * 6     /usr/bin/update-viruses

Whatever you do, make sure you specify the first field (minutes) to some
value, or it will run every minute!



________________________________________________________________________
Ramon Casha
Malta Linux User Group (http://linux.org.mt)

Reply via email to