Get current timestamp of schedule task

Get current timestamp of schedule task

Ha Tuan Em -
Erantzun kopurua: 2

Hi,

My work is reference to timestamp of schedule task for caculating.

So I do not know how we can get the current timestamp in a schedule task?

Eranskina Capture.PNG
Puntuazioen batez bestekoa: -
Ha Tuan Em(e)ri erantzunda

Re: Get current timestamp of schedule task

Benjamin Ellis -
Particularly helpful Moodlers-ren irudia
Hi,

Just calling the PHP function time() will give you a timestamp but I am not sure that is what you are trying to do from your message.
Ha Tuan Em(e)ri erantzunda

Re: Get current timestamp of schedule task

Davo Smith -
Core developers-ren irudia Particularly helpful Moodlers-ren irudia Peer reviewers-ren irudia Plugin developers-ren irudia
All the information about each scheduled task is stored in DB table mdl_task_scheduled.

This includes nextruntime (the timestamp for the next time after which the task will run again) and lastruntime (the timestamp when the task last completed).