Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3925

Symfony run event after expiration command

$
0
0

I develop in symfony 6 as part of my application. I have to do a task where a User XYZ create an order. after X time (30 minutes for example) certain actions are done on this order automatically according to the actions that another user will have had to do during his 30 minutes

To achieve this system I thought I could achieve it in a basic way by doing: that when I create the task, I associate an expiration date field (TimeNow + 30 minutes) and then I do a cron that checks every minute for each spot if it has already expired.

Is there any other approach to do this? I find this a basic one for my approach, because assuming that the cron every minute must check more than 20,000 active commands in order to check what has already expired, it will be a bit greedy in server resources


Viewing all articles
Browse latest Browse all 3925

Trending Articles