Cron
This is an open discussion with 35 replies, filed under Extensions.
Search
#win ∞
#win ∞
This is fantastic Alistair. Giving site developers control over scheduled tasks goes a long way to removing one the last major bottlenecks for us - sysadmin.
Hells. Yes. Great work, Alistair.
Cor blimey, win ad infinitum indeed! Something like this has been in my mind for a long time and I was never sure how to implement it.
So for clarification, one sets up all of the tasks and then sets up a single cron task on the server to the run-tasks
command:
symphony -t [token] cron run-tasks
How often would this cron need to run?
It would be based on the intervals set in your tasks. So, if you had a task running every hour and one every 30 minutes, you’d need to set the cron to trigger every 30 minutes.
I like the To-Do stuff in the README as well:
Poor mans cron
I once used a PHP pseudo cron script in Symphony (triggered by an event), which is licensed under GPL. Maybe it could help.
http://www.bitfolge.de/?l=en&s=pseudocron
This is not maintained anymore. The download is not even the latest version. I have archived 1.3.1, just in case anybody is interested in this. Drop me a line.
Great, look forward to somebody documenting the building of their lifestream with this, just like sweetcron
building of their lifestream with this
That’s coming — I’m working on stabilising Rowan’s “Import Manager” field which imports XML to sections. Eventually it’ll have cron support too. Look for its release in a month or two.
sounds good, I thougth you could just use forms and events, like bauhause explained in his importing xml tutorial, to get xml into sections? Wow is th eimport manager different? Just in its ability to get xml into multiple sections at once?
I’ll answer this more when it’s closer to release; let’s keep this thread about the cron :-)
Awesome work, Alistair.
Fantastic work Alistair! Thank you.
Awesome. Excellent work!
@Alistair Don’t you think that’s better to use a php array like in config.php
instead of a XML file?
Thanks for the link michael-e. Poor mans cron would actually be fairly simple to implement. The Cron extension would subscribe to some global delegate in Symphony (either backend or frontend) so it could trigger every page load. This would then spawn a shell call to symphony -t XXX cron run-tasks
and not wait for any result, as we don’t want the page rendering to be tied up waiting for run-tasks
to complete. This approach would require some extra logic, like the use of a mutex to prevent more than one instance of run-tasks
at a time.
Don’t you think that’s better to use a php array like in config.php instead of a XML file?
Hmm, XML
is cooler though right? ;) The main reason was invalid PHP
would cause fatal errors and the script would die. Whereas, invalid XML can be handled gracefully. That was really the only reason.
I’m working on stabilising Rowan’s “Import Manager” field which imports XML to sections. Eventually it’ll have cron support too. Look for its release in a month or two.
Hells, yes!
WOW! Unbelievable! I can’t wait to use this. Very, very nice!
Cool! How did I miss this?!
Any further development on this extension?
Create an account or sign in to comment.
A system for automating tasks via cron.
http://github.com/pointybeard/cron/tree/master
This is the Task List interface in the Admin
Editing a Task
If you run the
run-tasks
command from the command line, this is what you would see.