Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.We should make tasks restartable on a regular basis. The first reason why we want that is to periodically verify sites, but it would also be useful for backups (nightly backups) or restore (demo sites).
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | task_queue.png | 71.21 KB | tstoeckler |
| #4 | task_schedule.png | 67.73 KB | tstoeckler |
| #4 | task_add_new_scheduled.png | 84.96 KB | tstoeckler |











Comments
Comment #1
anarcat CreditAttribution: anarcat commentedThis depends on #422970: have one task type per site node.
See also #422966: automated backups (and backups garbage collection).
Comment #2
anarcat CreditAttribution: anarcat commentedA better title.
Comment #3
adrian CreditAttribution: adrian commentednot sure how we want this to work or be configurable.
i'm guessing it should just trigger it in normal cron, adding them to the queue.
Comment #4
tstoecklerI put together some screenshots with Firebug.
Thoughts?
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedLooks like a good start. For the sake of a scheduled task, there should be a 'frequency' option in the new-scheduled-task form to match that which you've put in the queue list.
Also, as an idea, is it worth not only setting a frequency but optionally a static date/time? Think in terms of creating a calendar event. Is this a one-off task to occur at a certain time, or (more likely) should it be a recurring event weekly? etc.
At this point 'how it looks' matters less to me than how the code logic will work behind to ensure that hosting-dispatch can interrogate certain items like this in the queue and whether it is time to execute the task or not. Mainly because that's the hard part :)
Comment #6
bjalford CreditAttribution: bjalford commentedWhat about including these tasks: create platforms (using the make files) and also having a migrate task. This would allow a form of continuous integration?
Comment #7
Steven Jones CreditAttribution: Steven Jones commentedSome thoughts on this:
Basically what we want here is some kind of ability to specify a date and time to execute a task on, and then subsequently (optionally) repeat it to some schedule. The date package provides all of this, we just need to utilise it, here's how it might work:
We store the next time that the specified task should execute, using the data_api provided FAPI elements, of course. We also use the date_repeat API to allow a repeat rule to be created.
We create a hosting queue that processes the scheduled tasks, find ones that should have been executed. We add the tasks to the standard hosting task queue and then if they have a repeat rule then we compute the date and time of the next occurrence, and then store that.
Thoughts?
Comment #8
Steven Jones CreditAttribution: Steven Jones commentedAnother random thought:
Should scheduled tasks be ctools exportable, so that for example, there can be a 'default' backup task for all sites hosted by a particular Aegir, but it could be disabled/edited per site. It might get messy, but there is going to be some need for default schedules tasks of some kind I think.
Comment #9
ergonlogicAlong with scheduled tasks, if we re-implemented site crons as tasks, we would then have scheduling granularity similar to crontab. This could certainly be useful for sites where a cron run could put the server under some pretty heavy load, such as an API site churning through the job queue populated by Grammar Parser.
Comment #10
jackbravo CreditAttribution: jackbravo commentedsubscribe.
Comment #11
ergonlogicComment #12
chertzogwe could use rules and rules scheduler to handle creating tasks to be run at future dates.
Comment #13
Jon PughWow, 7 years!!
I think we definitely need a "verify queue" of some kind.
For servers and sites, Aegir would make a great monitoring tool if it had this feature.
Comment #14
Jon PughComment #15
helmo CreditAttribution: helmo at Initfour websolutions for Aegir Cooperative commentedI don't think we should invent our own scheduling system ...
Could we leverage rules scheduler or elysia_cron?
Comment #16
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedI'm assigning this ticket to myself and will come up with something in the next few weeks.
Unless someone else was going to do something sooner in which case, un-assign me :)
Comment #17
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedSo, some more concrete thoughts about how to implement this:
Comment #18
colan@Steven: Can we make this work with #15? I've used Elysia Cron in the past; it works great, and does at least some of the above. Wouldn't mind knowing your thoughts on using what's already out there.
Comment #19
Jon PughI'm finally making this happen for a client.
Stand by.