-
Notifications
You must be signed in to change notification settings - Fork 13
Switch from Cron to Job class #4
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
base: release/16.0
Are you sure you want to change the base?
Conversation
Cron is long deprecated
No need to do things here anymore. Initialization is done inside the BMO class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no job class so this does nothing
Yep you are right. Copied over from Jira by memory... I will have a look later and update the PR |
And here we go, added missing class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks correct now
Hi any update on this? Mi system again lost the crontab (don't know why...). Switching to Job will fix the issue |
Hi @Massi-X "update" certificates involves the network call and if that's gets delayed due to any network issue then subsequent processes/tasks in the jobs queue will get delayed. Did you tried to check why cron job is getting removed automatically from your linux server? may be /var/log/cron or /var/log/message can give you some idea. |
Hi Kapil, that's a good point. I will have a look or I could also implement a parallel Job system, shouldn't be to hard |
This is the main reason of keeping this in linux cron and not adding to the "fwconsole jobs" @Massi-X . We have plan to revisit the "fwconsole jobs" for FreePBX 17 so may be worth to take a look in 17 where we have all the updates libs. |
I am not sure why this is a "future" item as the fix to that is simply adding a try catch. This is out of scope on this PR but
|
@jfinstrom yeah I did this for one of my projects. In reality it is as simple as creating a php file that acts as a background handler, and call it multiple times concurrently with exec(). Will have a look (after calendar module!) |
This is a repost of the same PR made in Jira.
Following a problem I had with certman failing to renew certificates because its crontab was not executed, I noticed that certman is still using the long deprecated Cron class. This PR fixes the behavior by switching to the standard Job class.