Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduler issues - can't run overlapping tasks #49

Closed
varemel opened this issue Jan 4, 2024 · 1 comment
Closed

Scheduler issues - can't run overlapping tasks #49

varemel opened this issue Jan 4, 2024 · 1 comment

Comments

@varemel
Copy link

varemel commented Jan 4, 2024

Thanks for your work.

Faced 2 issues regarding Laravel scheduler:

  1. Can't run more than 1 job simultaneously. Reason is lack of -overlappingflag in supercronic start command (https://github.com/aptible/supercronic#duplicate-jobs).

Suggest to add this flag in supervisord.app.conf

[program:scheduler]
...
command=supercronic -overlapping /etc/supercronic/laravel
...
  1. Need to clear jobs mutexes in case of container restart.

Suggest to add to supervisord.app.conf one time process with autorestart=false

[program:clear-scheduler-cache]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/artisan schedule:clear-cache
user=%(ENV_NON_ROOT_USER)s
autostart=%(ENV_APP_WITH_SCHEDULER)s
autorestart=false
stdout_logfile=/var/www/html/scheduler.log
@smortexa
Copy link
Member

Thanks for your suggestions, and I'm happy to say I've implemented them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants