If for some reason a job takes longer than PHP's max_execution_time, it'll fail to complete. Since the job was already dequeued, it will never get completed. Is this a correct assessment of how Job Queue works?

I have a system with some jobs that might take too long to complete in some situations. I don't want these jobs to get lost though; I want them to be queued up for later. Is there some way they could be added back to the queue? Perhaps Job Queue could not remove jobs from the queue until they were completed.

Comments

drumm’s picture

Status: Active » Closed (works as designed)

If the job won't complete, then requeueing it will just have it not complete again and again. You should change your PHP settings. If you call cron from CLI, that has a separate php.ini, so you can be more liberal without affecting web requests. Drush and drupal.sh both do this.