TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Scheduler\Execution Class Reference

Public Member Functions

 setStart ($start)
 
 getStart ()
 
 setEnd ($end)
 
 getEnd ()
 
 setInterval ($interval)
 
 getInterval ()
 
 setMultiple ($multiple)
 
 getMultiple ()
 
 setCronCmd ($cmd)
 
 getCronCmd ()
 
 setIsNewSingleExecution ($isNewSingleExecution)
 
 getIsNewSingleExecution ()
 
 getNextExecution ()
 
 isStarted ()
 
 isEnded ()
 

Protected Attributes

 $start
 
 $end
 
 $interval
 
 $multiple = false
 
 $cronCmd
 
 $isNewSingleExecution = false
 

Detailed Description

This class manages the logic of a particular execution of a task

Definition at line 20 of file Execution.php.

Member Function Documentation

◆ getCronCmd()

TYPO3\CMS\Scheduler\Execution::getCronCmd ( )

Get the value of the cron command

Returns
string Cron command, using cron-like syntax

Definition at line 169 of file Execution.php.

References TYPO3\CMS\Scheduler\Execution\$cronCmd.

Referenced by TYPO3\CMS\Scheduler\Execution\getNextExecution().

◆ getEnd()

TYPO3\CMS\Scheduler\Execution::getEnd ( )

This method is used to get the end date

Returns
int End date (timestamp)

Definition at line 106 of file Execution.php.

References TYPO3\CMS\Scheduler\Execution\$end.

◆ getInterval()

TYPO3\CMS\Scheduler\Execution::getInterval ( )

This method is used to get the interval

Returns
int Interval (in seconds)

Definition at line 127 of file Execution.php.

References TYPO3\CMS\Scheduler\Execution\$interval.

◆ getIsNewSingleExecution()

TYPO3\CMS\Scheduler\Execution::getIsNewSingleExecution ( )

Get whether this is a newly created single execution

Returns
bool Is newly created single execution?

Definition at line 197 of file Execution.php.

References TYPO3\CMS\Scheduler\Execution\$isNewSingleExecution.

Referenced by TYPO3\CMS\Scheduler\Execution\getNextExecution().

◆ getMultiple()

TYPO3\CMS\Scheduler\Execution::getMultiple ( )

This method is used to get the multiple execution flag

Returns
bool TRUE if concurrent executions are allowed, FALSE otherwise

Definition at line 148 of file Execution.php.

References TYPO3\CMS\Scheduler\Execution\$multiple.

◆ getNextExecution()

◆ getStart()

TYPO3\CMS\Scheduler\Execution::getStart ( )

This method is used to get the start date

Returns
int Start date (timestamp)

Definition at line 85 of file Execution.php.

References TYPO3\CMS\Scheduler\Execution\$start.

◆ isEnded()

TYPO3\CMS\Scheduler\Execution::isEnded ( )

Checks if the schedule for a task is passed or not

Returns
bool TRUE if the schedule is not active anymore, FALSE otherwise

Definition at line 275 of file Execution.php.

Referenced by TYPO3\CMS\Scheduler\Execution\getNextExecution().

◆ isStarted()

TYPO3\CMS\Scheduler\Execution::isStarted ( )

Checks if the schedule for a task is started or not

Returns
bool TRUE if the schedule is already active, FALSE otherwise

Definition at line 265 of file Execution.php.

Referenced by TYPO3\CMS\Scheduler\Execution\getNextExecution().

◆ setCronCmd()

TYPO3\CMS\Scheduler\Execution::setCronCmd (   $cmd)

Set the value of the cron command

Parameters
string$cmdCron command, using cron-like syntax
Returns
void

Definition at line 159 of file Execution.php.

◆ setEnd()

TYPO3\CMS\Scheduler\Execution::setEnd (   $end)

This method is used to set the end date

Parameters
int$endEnd date (timestamp)
Returns
void

Definition at line 96 of file Execution.php.

References TYPO3\CMS\Scheduler\Execution\$end.

◆ setInterval()

TYPO3\CMS\Scheduler\Execution::setInterval (   $interval)

This method is used to set the interval

Parameters
int$intervalInterval (in seconds)
Returns
void

Definition at line 117 of file Execution.php.

References TYPO3\CMS\Scheduler\Execution\$interval.

◆ setIsNewSingleExecution()

TYPO3\CMS\Scheduler\Execution::setIsNewSingleExecution (   $isNewSingleExecution)

Set whether this is a newly created single execution. This is necessary for the following reason: if a new single-running task is created and its start date is in the past (even for only a few seconds), the next run time calculation (which happens upon saving) will disable that task, because it was meant to run only once and is in the past. Setting this flag to TRUE preserves this task for a single run. Upon next execution, this flag is set to FALSE.

Parameters
bool$isNewSingleExecutionIs newly created single execution?
Returns
void
See also
::getNextExecution()

Definition at line 187 of file Execution.php.

References TYPO3\CMS\Scheduler\Execution\$isNewSingleExecution.

Referenced by TYPO3\CMS\Scheduler\Execution\getNextExecution().

◆ setMultiple()

TYPO3\CMS\Scheduler\Execution::setMultiple (   $multiple)

This method is used to set the multiple execution flag

Parameters
bool$multipleTRUE if concurrent executions are allowed, FALSE otherwise
Returns
void

Definition at line 138 of file Execution.php.

References TYPO3\CMS\Scheduler\Execution\$multiple.

◆ setStart()

TYPO3\CMS\Scheduler\Execution::setStart (   $start)

This method is used to set the start date

Parameters
int$startStart date (timestamp)
Returns
void

Definition at line 75 of file Execution.php.

References TYPO3\CMS\Scheduler\Execution\$start.

Member Data Documentation

◆ $cronCmd

TYPO3\CMS\Scheduler\Execution::$cronCmd
protected

◆ $end

TYPO3\CMS\Scheduler\Execution::$end
protected

◆ $interval

TYPO3\CMS\Scheduler\Execution::$interval
protected

◆ $isNewSingleExecution

TYPO3\CMS\Scheduler\Execution::$isNewSingleExecution = false
protected

◆ $multiple

TYPO3\CMS\Scheduler\Execution::$multiple = false
protected

◆ $start

TYPO3\CMS\Scheduler\Execution::$start
protected