How to schedule moodle cron job to run every day at 12 am

How to schedule moodle cron job to run every day at 12 am

by Amira Elsayed -
Number of replies: 2

Hello 

I have moodle instance and I found in the notification that the corn job does not run from 182 days, I want to configure it to run everyday @ 12 am , how can I do that ?

Average of ratings: -
In reply to Amira Elsayed

Ri: How to schedule moodle cron job to run every day at 12 am

by Sergio Rabellino -
Picture of Particularly helpful Moodlers Picture of Plugin developers
You should run the cron job every 1 or max 2 minutes, or your user experience will be affected.
Check the official instruction about cron here: https://docs.moodle.org/311/en/Cron : the setup varies depending on your specific installation choices.
Average of ratings: Useful (1)
In reply to Amira Elsayed

Re: How to schedule moodle cron job to run every day at 12 am

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
If the cron process was not run for half a year, then once a day could be a start.
wink

Edit the 'crontab -u www-data -e' to:
* 12 * * * /usr/bin/php  /path/to/moodle/admin/cli/cron.php
See https://docs.moodle.org/en/Cron#Finding_the_right_place_to_put_the_command for the background.

You can invoke the cron process through the web, visit yoursite/admin/cron.php from a browser if you have enabled that. See https://docs.moodle.org/en/Cron#The_web_based_Moodle_cron_command.
Average of ratings: Useful (1)