I don't we ever got around to building periodic tasks in-tree.
Back then we talked about creating a cron.yml file that would list tasks
that should run periodically.
Then taskcluster-hooks would periodically kick off a decision task that
would create tasks from cron.yml.
But perhaps a better design is to "optimize" out tasks that should only run
periodically.
Perhaps using a transform like:
when:
every: '24 hours'
Then we just need taskcluster-hooks to run a task that kicks off a decision
task for the latest revision on mozilla-central with some try flag
indicating that periodic tasks should be scheduled.
If taskcluster-hooks could kick off such a task every 3 hours, we could
reasonably schedule things to run every: 3, 6, 12, 24, 48 or 72 hours.
In-tree we would just add a YAML file like we do for most other tasks, and
give it a "when.every" clause, similar to how the 'when.files-changed'
clause is used to only run tasks if certain files have changed.
Note: I say taskcluster-hooks would run an auxiliary task that kicks off
the decision task.
Because the auxiliary task would need find latest revision on
mozilla-central and set appropriate routes
for the decision tasks to show up on treeherder.
@dustin, what do you think? I suspect the task-kind optimization logic can
lookup the task-label in the index, to determine whether to schedule or not.
--
Regards Jonas Finnemann Jensen.
2016-11-22 8:43 GMT-08:00 Armen Zambrano G. <
arm...@mozilla.com>:
> I wonder if instead of hooks, the gecko decision task could determine
> that it should run a periodic job by checking when was the last time one
> of those jobs run.
>
> In other words, I'm proposing that there is an in-tree mechanism to say
> "run this task if it has passed more than X seconds since it has run".
>
> I could also potentially implement this inside of SETA, however, I believe
> this is a common feature that we should support via TaskCluster.
>
> regards,
> Armen
> _______________________________________________
> tools-taskcluster mailing list
>
tools-ta...@lists.mozilla.org
>
https://lists.mozilla.org/listinfo/tools-taskcluster
>