How to setup the cron job if the script needs to be run with http protocol?

Example 1:

If you don't care much about the web page output, then
30 3 * * * /usr/bin/lynx --dump http://www.domain.com/script.php

Example 2:

Some time your script required authentication. If so, then it should be like the below entry in the cron job.

0 1 * * * /usr/bin/lynx -dump -cookies=on -auth=scott:tiger > /dev/null http://www.domain.com/script.php

0 comments: