Hello,
is there a way to schedule a task to run once in future?
What I am trying to achieve with this is the following:
* Let's say the user has to do something at least N minutes, so when the user starts to do something, I would like to schedule a task to now + N minutes that will check if it's done and take the necessary actions (of course it will take care of user's logouts and session timeouts and so, but there is no reason to test if it's done before the minimum amount of time and I think this approach is better than call a query each minute (even if it is only one query for all users)).
In classic unix cron I could set all the "time variables", that includes the year (moodle does not have year on it's syntax), and it would be executed only once in the expected date/time. But then that task would be there forever and would accumulate with others of the same kind and it's not really a good side effect.
Does anyone have any ideas?
Kind regards,
Daniel