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

Example with Sera + rationale #22

Open
phptek opened this issue Aug 3, 2016 · 3 comments
Open

Example with Sera + rationale #22

phptek opened this issue Aug 3, 2016 · 3 comments

Comments

@phptek
Copy link

phptek commented Aug 3, 2016

In the README there is the following statement:

Warning: Observe that the crontask module doesn't to any scheduling. If the run time is more than one
minute, it might start another process that interferes with the still running process.

It would be great to pad this out a bit with a rationale and an example using Sera. E.g.

Warning: Ensure that a custom CronTask doesn't do any scheduling of its own. If a custom CronTask itself forks other sub tasks or is itself long running (i.e. > 1m), the server's cron-job might start another process that interferes with any existing and running processes. This can be mitigated by running the module's cron-job less frequently or proxying the module's cron-jobs through the "Sera" module, which implements a form of DML (Distributed Mutex Locking) e.g.

* * * * * sera 60 $( www-data /usr/bin/php /path/to/silverstripe/docroot/framework/cli-script.php dev/cron )
@tractorcow
Copy link

Would you like to PR a fix to the documentation please?

@phptek
Copy link
Author

phptek commented Sep 8, 2016

@tractorcow I ask because I've never used sera and before I did, wanted to understand how it worked. If the text I wrote above fits the bill and is accurate, I'd be more than happy to submit a PR for it, "as-is".

@tractorcow
Copy link

I'm also unfamiliar with sera, so your advice would be better than mine. :)

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

No branches or pull requests

5 participants