I'm recording entries into crontab using PHP (
www-data user). The first entry is a scheduler that runs every minute. If the scheduler finds a specific criteria it adds new entry to crontab. After I add an entry, the scheduler (that should run every minute) stops working. The cron jobs aren't running in parallel. It is like the
www-data user could only execute a single cron job.
My scheduler, which works when it's the only thing in the crontab:
* * * * * curl --silent http://myapi_url/scheduler >/dev/null 2>&1
When the scheduler runs, it adds a new entry:
18-59/2 * * * * curl --silent http://myapi_url/user/10 >/dev/null2>&1`
So the new entry works, but the scheduler stops working. If I add yet another new entry, the two previously added stop working but not the new one. Why?
The crontab looks like this:
* * * * * curl --silent http://myapi_url/scheduler >/dev/null 2>&1 18-59/2 * * * * curl --silent http://myapi_url/user/10 >/dev/null 2>&1
each new entry comes below.