PHP Class Aoe_Scheduler_Model_ScheduleManager, Aoe_Scheduler

Since: 2014-08-14
Author: Fabrizio Branca
Mostrar archivo Open project: aoepeople/aoe_scheduler

Public Methods

Method Description
cleanup ( ) : Mage_Cron_Model_Observer Clean up the history of tasks This override deals with custom states added in Aoe_Scheduler
deleteAll ( ) Delete all schedules
deleteDuplicates ( ) Delete duplicate crons
flushSchedules ( string $jobCode = null ) Flushed all future pending schedules.
generateSchedules ( ) Generate cron schedule.
generateSchedulesForJob ( Aoe_Scheduler_Model_Job $job ) Generate jobs for config information
getMeasuredCronInterval ( ) : array | boolean Create some statistics based on self::CACHE_KEY_SCHEDULER_LASTRUNS
getPendingSchedules ( array $whitelist = [], array $blacklist = [] ) : Mage_Cron_Model_Resource_Schedule_Collection Get pending schedules
getScheduleForAlwaysJob ( $jobCode, $reason = null ) : Aoe_Scheduler_Model_Schedule | false Get job for task marked as always
logRun ( ) Log run
skipMissedSchedules ( ) Mark missed schedule records by changing status

Method Details

cleanup() public method

Clean up the history of tasks This override deals with custom states added in Aoe_Scheduler
public cleanup ( ) : Mage_Cron_Model_Observer
return Mage_Cron_Model_Observer

deleteAll() public method

Delete all schedules
public deleteAll ( )

deleteDuplicates() public method

Delete duplicate crons
public deleteDuplicates ( )

flushSchedules() public method

Flushed all future pending schedules.
public flushSchedules ( string $jobCode = null )
$jobCode string

generateSchedules() public method

Rewrites the original method to remove duplicates afterwards (that exists because of a bug)
public generateSchedules ( )

generateSchedulesForJob() public method

Generate jobs for config information
public generateSchedulesForJob ( Aoe_Scheduler_Model_Job $job )
$job Aoe_Scheduler_Model_Job

getMeasuredCronInterval() public method

Create some statistics based on self::CACHE_KEY_SCHEDULER_LASTRUNS

getPendingSchedules() public method

Get pending schedules
public getPendingSchedules ( array $whitelist = [], array $blacklist = [] ) : Mage_Cron_Model_Resource_Schedule_Collection
$whitelist array
$blacklist array
return Mage_Cron_Model_Resource_Schedule_Collection

getScheduleForAlwaysJob() public method

(Instead of reusing existing one - which results in loosing the history - create a new one every time)
public getScheduleForAlwaysJob ( $jobCode, $reason = null ) : Aoe_Scheduler_Model_Schedule | false
$jobCode
return Aoe_Scheduler_Model_Schedule | false

logRun() public method

Log run
public logRun ( )

skipMissedSchedules() public method

Mark missed schedule records by changing status
public skipMissedSchedules ( )