First of all check which jobs are currently scheduled:
user@compy:~> crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.XXXX8NR6OC installed on Mon Feb 5 17:51:55 2007)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
0 5 * * * /home/user/.backup.sh
This is the rsync job from the other week. So, next we need to create a script to run the namazu index. This is a simple shell script with the following command in it:
#!/bin/bash
mknmz -O ~/.namazu/index/ ~/work/articles/
Save this file somewhere like in ~/.namazu/.index.sh. Append this to the crontab in the same way as the rsync script was added - i.e. type crontab -e and add the following line:
0 5 * * * /home/user/.namazu/.index.sh
Then, type crontab -l to check that it has been added. You should now have a namazu index that updates everyday at 5AM.
No comments:
Post a Comment