I'm sure that this is a total noob question, but I'm still fairly new to this portion of web development/maintenance.
I'm having trouble with my scheduled tasks, I assumed that they were running (doing whatever these tasks are supposed to be doing) but when I checked today it showed that nothing has run since the day I discovered I was supposed to have these...
I did some looking up, but I couldn't find anything with a straight answer.
I've attached a screenshot of the Scheduled Tasks page and I am running Moodle 3.4 with PHP 7+ installed (since I saw that some suggested to update, but mine appears to be goo there), and I'm not sure what else I'm supposed to provide.
Thank you all in advance!!!
did you call the cron script to run either on CLI or through web interface?
Web interface has been disabled by default, so I plan to keep it that way (they suggest anyway).
I ran the script in CLI back in March, I assumed that would've been enough. Would running it again start the scheduled tasks like they are supposed to?
You can't run the cron script once and assume it will all be ok, you need to be running this script regularly, preferably once a minute, all day every day.
Unless you have a lot of spare time to do this manually, I suggest you automate it
There are suggestions about how to do this in the documentation: https://docs.moodle.org/en/Cron
I ran the "sudo crontab -u www-data -e" and entered:
*/1 * * * * /usr/bin/php7.0 /path/to/moodle/admin/cli/cron.php >/dev/null
And it worked fabulously!!!
Thank you so much
Last thing, what should I have my config.php permissions set to? I originally had 650, but I needed to put to 777 so that cron was allowed to run, so I'm wondering if this could turn into a security issue keeping it open like that?
I tried running and got a "Permission Error" on config.php.
I changed the permissions temporarily to 777, and now the script is running (I originally had the permissions set to 650).
Was that my problem? If so, what should the permission for my config file be?
Maybe you set the wrong permission in owner or your permissions is changing with some updates. I don't know but you should read https://www.linux.com/learn/understanding-linux-file-permissions and the step 5 in this https://docs.moodle.org/35/en/Step-by-step_Installation_Guide_for_Ubuntu
sudo chown -R www-data /var/moodledata
sudo chmod -R 777 /var/moodledata
sudo chmod -R 0755 /var/www/html/moodle