Answer the question
In order to leave comments, you need to log in
How to save the value of a variable between script runs, Symfony2?
Let's say there is a console script (Command) that runs once an hour and bypasses all users, manipulating their data. The script bypasses, for example, 300 users at a time, until after 6 hours it bypasses everyone and follows a new one. So, where to store the id of the user who got by last? Are there any facilities in symfony itself for such tasks?
Answer the question
In order to leave comments, you need to log in
in a file, in a database, in RAM (for example, a redis option), but anywhere.
the best option is to send tasks for processing to rabbitmq, and the script may fall off and the value will be lost.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question