How can I tell if moodle cron is working?

I just sent a messege to the server administrator asking if he can install cronjobs on the server, and he asked me to tell him if everything is working correctly. How to check if cronjob is working or not?

+7
source share
4 answers

You need to output the Moodle cron to a log file, for example. your cron.d entry might look like this:

* * * * * www-data /usr/bin/php /var/www/moodle/admin/cli/cron.php >> /var/log/vle/moodle-cron.log 2>&1 

Then the contents of /var/log/vle/moodle-cron.log will tell you if cron is working fine. If you want to go further, you can even keep an eye on the file for the latest update, using some viewing tools and get warnings if cron stops.

+1
source

This is true, as the edelgado said, - if the cron task does not start from 24 hours, there will be a message on the notification page.

However, if you want to run the script immediately, you can simply go to:

 http://www.mymoodlesite.com/admin/cron.php 

Where www.mymoodlesite.com is the address of your copy of moodle.

The page will display the output of the script as it is being launched by the server. If something works as it should, it will print similar lines at the end of the page:

 Cron script completed correctly Execution took 1.938528 seconds 
+3
source

Go to the Notifications page. If cron has not started in the last 24 hours, it will show you a message about this fact.

0
source

I am running WAMP 2.2. I used this page of the moodle document , specifically the moodle cron package . We downloaded the MoodleCron-Setup.exe file, installed and confirmed that the Windows service is active and working. The name of the service is Moodle Cron . If the status says β€œStart,” then you must be set up. If you double-click on a service and view its properties, it should have an Automatic startup type.

0
source

All Articles