dimanche 29 juillet 2018

Update status field according to the datetime field in Yii2

I want to implement an Event Management System in Yii2.

I have a datetime property in event table that shows when the event start. I have another property in event table that shows status of event and it has three value NOT_STARTED , HOLDING and FINISHED.

I want to update status field according to datetime. Cron jobs maybe not a good suggestion because events may be very close in datetime and i can't run action in every minutes.

How should i do this?

Aucun commentaire:

Enregistrer un commentaire