V
V
Vasily2014-08-06 12:38:55
symfony
Vasily, 2014-08-06 12:38:55

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

2 answer(s)
P
Push Pull, 2014-08-06
@deadbyelpy

in a file, in a database, in RAM (for example, a redis option), but anywhere.

P
Pavel Solovyov, 2014-08-06
@pavel_salauyou

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 question

Ask a Question

731 491 924 answers to any question