General developer forum

Scheduled Task Not Running

 
Picture of Amy Stewart
Scheduled Task Not Running
 

I have created a scheduled task for a custom authentication plugin.  The taks runs fine when running it via the command line (https://docs.moodle.org/32/en/Administration_via_command_line#Scheduled_tasks) however, it will not run properly otherwise.  I have added debugging messages so that it will print to the log when the task begins, however, those messages do not show up in the log, unless running via the command line.  Any thoughts on how to fix this?


Thanks!

 
Average of ratings: -
Picture of Dimitar Ivanov
Re: Scheduled Task Not Running
 

Is it listed on the Scheduled tasks page? (https://docs.moodle.org/32/en/Scheduled_tasks)


If not you might need to bump the version number of your plugin, in order for Moodle to update it's list of scheduled tasks.


 
Average of ratings: -
Picture of Amy Stewart
Re: Scheduled Task Not Running
 
Thank you for your reply. I just got this working a short while ago.  Our moodle admin had turned off cron jobs on our test box.  Once cron was running, it began working.


Thanks!

 
Average of ratings: Useful (1)
Picture of Dimitar Ivanov
Re: Scheduled Task Not Running
 
I'm glad you figured it out, and posted your solution smile


 
Average of ratings: -