Problems setting up cron jobs on wget permission denied linux servers

Problems setting up cron jobs on wget permission denied linux servers

by David Prinzing -
Number of replies: 1

Ok, I have a solution for many conjob problems that I have seen and that I, myself, have had.  Instead of using wget or other commands that are restricted, try this:

 php /home/yourwebsite/public_html/moodle/admin/cron.php > /dev/null 2>&1

This worked GREAT for me when I couldn't get cron jobs to work properly on my restricted server.  Notice how I did NOT call for the website from a domain name but rather from the home directory.  This seems to fix some 404 errors.  Also, notice the php in place of wget and the "2>&1" after "/dev/null"

Hope this helps people out.

Average of ratings: -
In reply to David Prinzing

Re: Problems setting up cron jobs on wget permission denied linux servers

by Sean Topkok -
After trying all the instructions in the Install - Cron Setup (short of trying the Windows download...I'm on a Mac OSX), I've searched quite a few messages on "Using Moodle". This post and cron command finally worked for me!!

Thanks for posting this David!!