mercredi 27 juillet 2016

PHP / MySQL: do tasks based on schedule in database

I would like to have a database with weekly PHP tasks that can be set by the user. As an example the user could create a task "Send Email" every Friday at 10am in time-zone GMT+5.

I want to create a PHP script that searches the database for tasks that need to be executed just now. What would be the proper way set up the database and to search the database for tasks to be executed?

The major issues are that (1) the tasks are repeating weekly and are not set to a fixed date/time and (2) different time-zones have to be considered (which prevents filtering based on the current weekday).

My initial plan was to use a database of task|timezone|weekday|time, but other suggestions are welcome.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire