We have found the easiest way is to put the commands in a shell script, eg:
## check_and_build_directory.script
/bin/date
echo "Directory: check links, build pages"
echo "==========================================================="
echo "Checking links from 5 days"
perl <PATH_TO>/admin/nph-verify.cgi --check_from 5
echo "==========================================================="
echo "Re-checking problem links"
perl <PATH_TO>/admin/nph-verify.cgi --check_problem
echo "==========================================================="
echo "Build directory"
perl <PATH_TO>/admin/nph-build.cgi --changed
echo "==========================================================="
echo "Done"
Then get cron to run the script:
Add a line like this to mycron.txt (or whatever you call it) ...
Update your cron table by running crontab mycron.txt
Code:
#! /bin/sh ## check_and_build_directory.script
/bin/date
echo "Directory: check links, build pages"
echo "==========================================================="
echo "Checking links from 5 days"
perl <PATH_TO>/admin/nph-verify.cgi --check_from 5
echo "==========================================================="
echo "Re-checking problem links"
perl <PATH_TO>/admin/nph-verify.cgi --check_problem
echo "==========================================================="
echo "Build directory"
perl <PATH_TO>/admin/nph-build.cgi --changed
echo "==========================================================="
echo "Done"
Then get cron to run the script:
Add a line like this to mycron.txt (or whatever you call it) ...
Code:
50 1 * * * nice -20 sh $HOME/scripts/check_and_build_directory.script