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

[Feature Request] free cron at a certain time #35

Open
Remitur opened this issue Jul 13, 2021 · 0 comments
Open

[Feature Request] free cron at a certain time #35

Remitur opened this issue Jul 13, 2021 · 0 comments
Assignees
Labels
feature request New feature or request

Comments

@Remitur
Copy link

Remitur commented Jul 13, 2021

The way WHMCS manages the crons is poor: mainly, just two main hook points (AfterCronJob and DailyCronJob) that allow a script to run or every 5 minutes (or any other lapse of time set by the owner of WHMCS) or during main daily cron job (at the time that is set by the owner of WHMCS)

But, what if I need to run a script in at a certain time?

The only way, currently, is setting in the system a dedicated cron, to run my own script... but this is complicated to set, and even more complicated to monitor.

So, it would be useful a hook that, using AfterCronJob (and so, running every 5 minutes or so) do the following:

  • am I near to the time that this script has to be run?
  • am I sure the script has not already run for this session ? (check just to be sure that the script does not run twice al the same session)
  • if not: return
  • if yes: run the function you need
@Remitur Remitur added the feature request New feature or request label Jul 13, 2021
@Remitur Remitur changed the title [Feature Request] [Feature Request] free cron at a certain time Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants