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

@background and @start #11

Open
g105b opened this issue Jan 21, 2020 · 2 comments
Open

@background and @start #11

g105b opened this issue Jan 21, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@g105b
Copy link
Member

g105b commented Jan 21, 2020

Linux crontab supports replacing the date/time columns with @reboot to indicate that the script should be run once on reboot.

As a new feature, @background can be used to indicate that the script should be run forever in the background (waiting for the process to finish before starting again).

@start can be used to indicate that the script should be run once at the start of the server starting.

@g105b g105b added enhancement New feature or request question Further information is requested labels Jan 21, 2020
@g105b g105b self-assigned this May 10, 2020
g105b added a commit that referenced this issue Jun 18, 2020
@g105b
Copy link
Member Author

g105b commented Jun 29, 2020

.crontab.lock should be introduced to track the process execution here.

@start should create an entry once, and when it's in there, any future @start commands will not run. When running the dev server, this can be reset when the server starts, before the cron runner begins. On a server, the log entry can be removed on boot (using the @boot syntax!).

@background should use the lockfile to record the PID. On the minute, the cron bin executes, and if there is no PID (or the PID does is not running any more) it starts an endless loop to call the process.

@g105b
Copy link
Member Author

g105b commented Jul 1, 2022

This may require implementation of our own parsing mechanism. Currently a third party is depended on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant