I am having trouble executing at command via php. When I start this job, it runs the 1st time and creates a queue job 1 minute from it finishes the Run Logic. The queued job runs at specified time but it will not create a new job queue 1 minute after it completes the Run Logic so it dies.
The pseudo logic is
//task_queue.php
if(we_have_tasks){
Run Logic
shell_exec('/usr/local/bin/php -f task_queue.php | at now + 1 minutes');
}
What am I doing wrong? Any help is appreciated. I thought if I used the 'at' command I'll be able to schedule jobs without overlapping.
Thanks