I have a basic understanding of cron jobs, but I came across a tutorial today which recommends adding:
30 3 * * * wget http://www.mywebsite.com/bamboodir/index.php/recur
31 3 * * * rm -rf recur
What does the rm -rf recur
do?
It compensates for someone who doesn't know about the -O
option for wget
-- specifically, wget -O /dev/null
.
More specifically, the wget
call in that crontab hits a URL (presumably to trigger some sort of server-side processing -- always a sign of an absolute idiot of a web application or hosting environment). Since wget
downloads files, it will store the downloaded file named recur
it in the current directory. Then, a minute later, another cronjob deletes the file that was created, for tidiness.