shapecode / cron-bundle

This bundle provides a simple interface for registering repeated scheduled tasks within your application.
https://shapecode.github.io/cron-bundle/
MIT License
56 stars 25 forks source link

v5 branch - Command running cron jobs terminates #54

Open jahrsensetence opened 2 years ago

jahrsensetence commented 2 years ago

My observation is that I have jobs which have running_instances > 0 and, because of this, are then skipped and never executed again. Some of my jobs take up to four minutes, this is why I added a configuration file and set the process timeout to five minutes. Still I see the following in my log (output of the shapecode process):


 [OK] cronjob started successfully and is running in background.................

Running "app:update-most-recent-interaction-with-companies"
-----------------------------------------------------------

 [OK] cronjob started successfully and is running in background.................

Running "app:document-change-feed"
----------------------------------

 [Note] cronjob will not be executed. Next run is: Wed, 24 Aug 2022 19:50:00....
        -0400...................................................................

Summary
-------

 waiting for all running jobs ...

 // Cronjobs started at Wed, 24 Aug 2022 19:20:01 -0400.........................

Execute cronjobs
================

 [Info] Found 15 jobs...........................................................

Running "app:enrich-companies"
------------------------------

 [Note] cronjob will not be executed. Next run is: Wed, 24 Aug 2022 20:14:00....
        -0400...................................................................

The line that all jobs are finished is missing:

Summary
-------

 waiting for all running jobs ...

 [OK] All jobs are finished.....................................................

What can I do? I cannot see any error messages. My cronjob command looks as follows:

*/5 * * * * /usr/bin/docker exec hcw_php su symfony -c '/usr/local/bin/php -d memory_limit=2G /var/www/html/bin/console shapecode:cron:run' >> /tmp/shapecode.log 2>&1