TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Scheduler\Execution Class Reference
Inheritance diagram for TYPO3\CMS\Scheduler\Execution:
tx_scheduler_Execution

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 file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! This class manages the logic of a particular execution of a task

Author
François Suter franc.nosp@m.ois@.nosp@m.typo3.nosp@m..org
Christian Jul Jensen julle.nosp@m.@typ.nosp@m.o3.or.nosp@m.g
Markus Friedrich marku.nosp@m.s.fr.nosp@m.iedri.nosp@m.ch@d.nosp@m.kd.de

Definition at line 23 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 163 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
integer 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
integer Interval (in seconds)

Definition at line 125 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
boolean Is newly created single execution?

Definition at line 189 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
boolean TRUE if concurrent executions are allowed, FALSE otherwise

Definition at line 144 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
integer Start date (timestamp)

Definition at line 87 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
boolean TRUE if the schedule is not active anymore, FALSE otherwise

Definition at line 263 of file Execution.php.

References $result.

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
boolean TRUE if the schedule is already active, FALSE otherwise

Definition at line 254 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 154 of file Execution.php.

◆ setEnd()

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

This method is used to set the end date

Parameters
integer$endEnd date (timestamp)
Returns
void

Definition at line 97 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
integer$intervalInterval (in seconds)
Returns
void

Definition at line 116 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
boolean$isNewSingleExecutionIs newly created single execution?
Returns
void
See also
::getNextExecution()

Definition at line 180 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
boolean$multipleTRUE if concurrent executions are allowed, FALSE otherwise
Returns
void

Definition at line 135 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
integer$startStart date (timestamp)
Returns
void

Definition at line 78 of file Execution.php.

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

Member Data Documentation

◆ $cronCmd

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

The cron command string of this task,

Definition at line 58 of file Execution.php.

Referenced by TYPO3\CMS\Scheduler\Execution\getCronCmd(), and TYPO3\CMS\Scheduler\Execution\getNextExecution().

◆ $end

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

◆ $interval

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

Interval between executions (in seconds)

Definition at line 44 of file Execution.php.

Referenced by TYPO3\CMS\Scheduler\Execution\getInterval(), and TYPO3\CMS\Scheduler\Execution\setInterval().

◆ $isNewSingleExecution

boolean TYPO3\CMS\Scheduler\Execution::$isNewSingleExecution = FALSE
protected

This flag is used to mark a new single execution See explanations in method setIsNewSingleExecution()

See also
::setIsNewSingleExecution()

Definition at line 67 of file Execution.php.

Referenced by TYPO3\CMS\Scheduler\Execution\getIsNewSingleExecution(), and TYPO3\CMS\Scheduler\Execution\setIsNewSingleExecution().

◆ $multiple

boolean TYPO3\CMS\Scheduler\Execution::$multiple = FALSE
protected

Flag for concurrent executions: TRUE if allowed, FALSE otherwise (default)

Definition at line 51 of file Execution.php.

Referenced by TYPO3\CMS\Scheduler\Execution\getMultiple(), and TYPO3\CMS\Scheduler\Execution\setMultiple().

◆ $start

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