Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

avi's avatar
Level 2

Best way to implement recurring tasks

Hi, Users in my app (5.4) are able to mark task statuses as done. I would like these to be daily recurring tasks, which means their status should revert to open every day. Here are the ways I've thought of doing this, but I'm wondering what the best way is: A) Cron job, which resets the status every 24 hours, although different users in different timezones would make this complex B) Some sort of javascript timer, but this doesn't sound right

What should I be researching here? Thanks!

0 likes
2 replies
jekinney's avatar
  1. when a user login fire event to check status on reacuring tasks. Probably the simplest way.
avi's avatar
Level 2

Ok, that makes sense, thanks. So if I need to see how many times within 30 days (but not connected to calendar dates) I went jogging, when I log in I need to change the status for this session, but also compare the current date to the last session (where the status was updated) so I can log a history of how many days the status was not update for. I'll try to write a controller than handles this logic. Or is there a better way?

Please or to participate in this conversation.