php - Add custom task to Moodle cron job -


i'm working moodle 2.9, , trying add new task cron.
inside moodle/theme/portal folder added portal_cron() function lib.php file, run cron manually command line it's not working ?!
cron work ignored new task!
i'm doing wrong , how can add new task cron ?

have got cron value in moodle/theme/portal/version.php eg:

$plugin->cron = 60; // every 60 seconds. 

although cron function still available, should use scheduled tasks moodle 2.7+

https://docs.moodle.org/dev/task_api


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -