Project

General

Profile

Actions

Feature #66532

closed

Schedule tasks randomly

Added by Daniel Wagner about 9 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2015-04-22
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

State:
It is already possible to schedule tasks by cron-syntax, seconds or shortcuts like @daily, @hourly, ...

Problem:
Some tasks should not be run at the same time on all machines like @daily does.
This could for example unburden TER-repositories.

Idea:
Make it possible to start a task randomly within a day: @dailyrandom
Or use a little more concise approach for random tasks: expected runtime, task time.
Then the job should be scheduled randomly between starttime and starttime + tasktime - runtime.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #44297: Add interval presets to the "Add task" dialog of the schedulerClosed2013-01-03

Actions
Actions #1

Updated by Xavier Perseguers almost 9 years ago

Idea for that: add a "generate cron command" next to the field so that it just generates a random "daily" cron definition. This way we don't have to have much "magick" in it.

Actions #2

Updated by Daniel Goerz over 8 years ago

  • Parent task set to #68681
Actions #3

Updated by Susanne Moog about 5 years ago

  • Parent task deleted (#68681)
Actions #4

Updated by Georg Ringer about 4 years ago

  • Status changed from New to Resolved

This is easily possible since 9.5 with #44297.

Just create a simple extension and use something like that in ext_localconf.php

$rand = '0 7 * * ' . mt_rand(0,10);
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['frequencyOptions'][$rand] = 'random';

I am closing this issue

Actions #5

Updated by Georg Ringer about 4 years ago

  • Related to Feature #44297: Add interval presets to the "Add task" dialog of the scheduler added
Actions #6

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF