I am using Moodle 2.7.7+. I have created a local plugin - programmanagement with following information in plugin's version.php. Also, I have added a function i,e. local_programmanagement_cron() in the lib.php of plugin.
//version.php
$plugin->version = 2015090947; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2014050800; // Requires this Moodle version
$plugin->component = 'local_programmanagement'; // Full name of the plugin
$plugin->cron = 1;
I had the impression that whenever I would run localhost/mymoodle/admin/cron.php after passing the interval of 1(one) second, my cron of the plugin i,e. local_programmanagement_cron(), would get executed. Rather, It is getting executed on/after a larger interval.
Can you please let me know why is this not running the cron script after the interval of 1(one) second? I am executing cron manually through url - localhost/mymoodle/admin/cron.php
Although, I is recommended to implement task api for moodle version 2.7 onwards, however I want to know the reason of not executing the cron script of local plugin as expected.
Thanks in Advance.