interface CronJobInterface in Ultimate Cron 8.2
Hierarchy
- interface \Drupal\Core\Entity\EntityInterface; interface \Drupal\Core\Config\Entity\ThirdPartySettingsInterface; interface \Drupal\Core\Entity\SynchronizableInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityInterface
- interface \Drupal\ultimate_cron\CronJobInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityInterface
Expanded class hierarchy of CronJobInterface
All classes that implement CronJobInterface
7 files declare their use of CronJobInterface
- CronJob.php in src/
Entity/ CronJob.php - Crontab.php in src/
Plugin/ ultimate_cron/ Scheduler/ Crontab.php - DatabaseLogger.php in src/
Plugin/ ultimate_cron/ Logger/ DatabaseLogger.php - LauncherBase.php in src/
Launcher/ LauncherBase.php - LauncherInterface.php in src/
Launcher/ LauncherInterface.php
File
- src/
CronJobInterface.php, line 9
Namespace
Drupal\ultimate_cronView source
interface CronJobInterface extends ConfigEntityInterface {
/**
* Cron job ID prefix for queue jobs.
*/
const QUEUE_ID_PREFIX = 'ultimate_cron_queue_';
/**
* Get locked state for multiple jobs.
*
* @param array $jobs
* Jobs to check locks for.
*/
public static function isLockedMultiple($jobs);
/**
* Load latest log entries.
*
* @param array $jobs
* Jobs to load log entries for.
*
* @return array
* Array of UltimateCronLogEntry objects.
*/
public static function loadLatestLogEntries($jobs, $log_types = array(
ULTIMATE_CRON_LOG_TYPE_NORMAL,
));
/**
* Get multiple job progresses.
*
* @param array $jobs
* Jobs to get progress for.
*
* @return array
* Progress of jobs, keyed by job name.
*/
public static function getProgressMultiple($jobs);
/**
* Gets the title of the created cron job.
*
* @return mixed
* Cron job title.
*/
public function getTitle();
/**
* Gets the cron job callback string.
*
* @return string
* Callback string.
*/
public function getCallback();
/**
* Gets the cron job module name used for the callback string.
*
* @return string
* Module name.
*/
public function getModule();
/**
* Gets scheduler array which holds info about the scheduler settings.
*
* @return array
* Scheduler settings
*/
public function getSchedulerId();
/**
* Gets launcher array which holds info about the launcher settings.
*
* @return array
* Launcher settings
*/
public function getLauncherId();
/**
* Gets logger array which holds info about the logger settings.
*
* @return array
* Logger settings
*/
public function getLoggerId();
/**
* Sets the title of the created cron job.
*
* @param $title
* @return mixed
* Cron job title.
*/
public function setTitle($title);
/**
* Sets the cron job callback string.
*
* @param $callback
* @return string
* Callback string.
*/
public function setCallback($callback);
/**
* Sets the cron job module name used for the callback string.
*
* @param $module
* @return string
* Module name.
*/
public function setModule($module);
/**
* Sets scheduler array which holds info about the scheduler settings.
*
* @param $scheduler_id
* @return array
* Scheduler settings
*/
public function setSchedulerId($scheduler_id);
/**
* Sets launcher array which holds info about the launcher settings.
*
* @param $launcher_id
* @return array
* Launcher settings
*/
public function setLauncherId($launcher_id);
/**
* Sets logger array which holds info about the logger settings.
*
* @param $logger_id
* @return array
* Logger settings
*/
public function setLoggerId($logger_id);
/**
* Check if the cron job is callable.
*
* @return bool
* TRUE if the job is callable, FALSE otherwise.
*/
public function isValid();
/**
* Get a signal without affecting it.
*
* @see UltimateCronSignal::peek()
*/
public function peekSignal($signal);
/**
* Get a signal and clear it if found.
*
* @see UltimateCronSignal::get()
*/
public function getSignal($signal);
/**
* Send a signal.
*
* @see UltimateCronSignal::set()
*/
public function sendSignal($signal, $persist = FALSE);
/**
* Clear a signal.
*
* @see UltimateCronSignal::clear()
*/
public function clearSignal($signal);
/**
* Send all signal for the job.
*
* @see UltimateCronSignal::flush()
*/
public function clearSignals();
/**
* Check job schedule.
*/
public function isScheduled();
/**
* Check if job is behind its schedule.
*/
public function isBehindSchedule();
/**
* Lock job.
*/
public function lock();
/**
* Unlock job.
*
* @param string $lock_id
* The lock id to unlock.
* @param boolean $manual
* Whether or not this is a manual unlock.
*/
public function unlock($lock_id = NULL, $manual = FALSE);
/**
* Get locked state of job.
*/
public function isLocked();
/**
* Run job.
*
* @param string $init_message
* (optional) The launch message. If left NULL, a default message will be
* displayed.
*
* @return bool
* TRUE if the job is ran, FALSE otherwise.
*/
public function run($init_message = NULL);
/**
* Get log entries.
*
* @param integer $limit
* (optional) Number of log entries per page.
*
* @return array
* Array of UltimateCronLogEntry objects.
*/
public function getLogEntries($log_types = ULTIMATE_CRON_LOG_TYPE_ALL, $limit = 10);
/**
* Load log entry.
*
* @param string $lock_id
* The lock id of the log entry.
*
* @return LogEntry
* The log entry.
*/
public function loadLogEntry($lock_id);
/**
* Load latest log.
*
* @return LogEntry
* The latest log entry for this job.
*/
public function loadLatestLogEntry($log_types = array(
ULTIMATE_CRON_LOG_TYPE_NORMAL,
));
/**
* Start logging.
*
* @param string $lock_id
* The lock id to use.
* @param string $init_message
* Initial message for the log.
*
* @return \Drupal\ultimate_cron\Logger\LogEntry
* The log object.
*/
public function startLog($lock_id, $init_message = '', $log_type = ULTIMATE_CRON_LOG_TYPE_NORMAL);
/**
* Resume a previosly saved log.
*
* @param string $lock_id
* The lock id of the log to resume.
*
* @return LogEntry
* The log entry object.
*/
public function resumeLog($lock_id);
/**
* Get module name for this job.
*/
public function getModuleName();
/**
* Get module description for this job.
*/
public function getModuleDescription();
/**
* Initialize progress.
*/
public function initializeProgress();
/**
* Finish progress.
*/
public function finishProgress();
/**
* Get job progress.
*
* @return float
* The progress of this job.
*/
public function getProgress();
/**
* Set job progress.
*
* @param float $progress
* The progress (0 - 1).
*/
public function setProgress($progress);
/**
* Format progress.
*
* @param float $progress
* (optional) The progress to format. Uses the progress on the object
* if not specified.
*
* @return string
* Formatted progress.
*/
public function formatProgress($progress = NULL);
/**
* Get a "unique" id for a job.
*/
public function getUniqueID();
/**
* Get job plugin.
*
* If no plugin name is provided current plugin of the specified type will
* be returned.
*
* @param string $plugin_type
* Name of plugin type.
* @param string $name
* (optional) The name of the plugin.
*
* @return \Drupal\ultimate_cron\CronPlugin
* Plugin instance of the specified type.
*/
public function getPlugin($plugin_type, $name = NULL);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AccessibleInterface:: |
public | function | Checks data value access. | 9 |
CacheableDependencyInterface:: |
public | function | The cache contexts associated with this object. | 34 |
CacheableDependencyInterface:: |
public | function | The maximum age for which this object may be cached. | 34 |
CacheableDependencyInterface:: |
public | function | The cache tags associated with this object. | 27 |
ConfigEntityInterface:: |
public | function | Calculates dependencies and stores them in the dependency property. | 2 |
ConfigEntityInterface:: |
public | function | Disables the configuration entity. | 2 |
ConfigEntityInterface:: |
public | function | Enables the configuration entity. | 2 |
ConfigEntityInterface:: |
public | function | Returns the value of a property. | 2 |
ConfigEntityInterface:: |
public | function | Gets the configuration dependencies. | 2 |
ConfigEntityInterface:: |
public | function | Gets whether on not the data is trusted. | 2 |
ConfigEntityInterface:: |
public | function | Checks whether this entity is installable. | 2 |
ConfigEntityInterface:: |
public | function | Returns whether this entity is being changed during the uninstall process. | 2 |
ConfigEntityInterface:: |
public | function | Informs the entity that entities it depends on will be deleted. | 2 |
ConfigEntityInterface:: |
public | function | Sets the value of a property. | 2 |
ConfigEntityInterface:: |
public | function | Sets the status of the configuration entity. | 2 |
ConfigEntityInterface:: |
public | function | Returns whether the configuration entity is enabled. | 2 |
ConfigEntityInterface:: |
public | function | Sets that the data should be trusted. | 2 |
CronJobInterface:: |
public | function | Clear a signal. | 1 |
CronJobInterface:: |
public | function | Send all signal for the job. | 1 |
CronJobInterface:: |
public | function | Finish progress. | 1 |
CronJobInterface:: |
public | function | Format progress. | 1 |
CronJobInterface:: |
public | function | Gets the cron job callback string. | 1 |
CronJobInterface:: |
public | function | Gets launcher array which holds info about the launcher settings. | 1 |
CronJobInterface:: |
public | function | Get log entries. | 1 |
CronJobInterface:: |
public | function | Gets logger array which holds info about the logger settings. | 1 |
CronJobInterface:: |
public | function | Gets the cron job module name used for the callback string. | 1 |
CronJobInterface:: |
public | function | Get module description for this job. | 1 |
CronJobInterface:: |
public | function | Get module name for this job. | 1 |
CronJobInterface:: |
public | function | Get job plugin. | 1 |
CronJobInterface:: |
public | function | Get job progress. | 1 |
CronJobInterface:: |
public static | function | Get multiple job progresses. | 1 |
CronJobInterface:: |
public | function | Gets scheduler array which holds info about the scheduler settings. | 1 |
CronJobInterface:: |
public | function | Get a signal and clear it if found. | 1 |
CronJobInterface:: |
public | function | Gets the title of the created cron job. | 1 |
CronJobInterface:: |
public | function | Get a "unique" id for a job. | 1 |
CronJobInterface:: |
public | function | Initialize progress. | 1 |
CronJobInterface:: |
public | function | Check if job is behind its schedule. | 1 |
CronJobInterface:: |
public | function | Get locked state of job. | 1 |
CronJobInterface:: |
public static | function | Get locked state for multiple jobs. | 1 |
CronJobInterface:: |
public | function | Check job schedule. | 1 |
CronJobInterface:: |
public | function | Check if the cron job is callable. | 1 |
CronJobInterface:: |
public static | function | Load latest log entries. | 1 |
CronJobInterface:: |
public | function | Load latest log. | 1 |
CronJobInterface:: |
public | function | Load log entry. | 1 |
CronJobInterface:: |
public | function | Lock job. | 1 |
CronJobInterface:: |
public | function | Get a signal without affecting it. | 1 |
CronJobInterface:: |
constant | Cron job ID prefix for queue jobs. | ||
CronJobInterface:: |
public | function | Resume a previosly saved log. | 1 |
CronJobInterface:: |
public | function | Run job. | 1 |
CronJobInterface:: |
public | function | Send a signal. | 1 |
CronJobInterface:: |
public | function | Sets the cron job callback string. | 1 |
CronJobInterface:: |
public | function | Sets launcher array which holds info about the launcher settings. | 1 |
CronJobInterface:: |
public | function | Sets logger array which holds info about the logger settings. | 1 |
CronJobInterface:: |
public | function | Sets the cron job module name used for the callback string. | 1 |
CronJobInterface:: |
public | function | Set job progress. | 1 |
CronJobInterface:: |
public | function | Sets scheduler array which holds info about the scheduler settings. | 1 |
CronJobInterface:: |
public | function | Sets the title of the created cron job. | 1 |
CronJobInterface:: |
public | function | Start logging. | 1 |
CronJobInterface:: |
public | function | Unlock job. | 1 |
EntityInterface:: |
public | function | Gets the bundle of the entity. | 2 |
EntityInterface:: |
public static | function | Constructs a new entity object, without permanently saving it. | 2 |
EntityInterface:: |
public | function | Creates a duplicate of the entity. | 2 |
EntityInterface:: |
public | function | Deletes an entity permanently. | 2 |
EntityInterface:: |
public | function | Enforces an entity to be new. | 2 |
EntityInterface:: |
public | function | Returns the cache tags that should be used to invalidate caches. | 2 |
EntityInterface:: |
public | function | Gets the key that is used to store configuration dependencies. | 2 |
EntityInterface:: |
public | function | Gets the configuration dependency name. | 2 |
EntityInterface:: |
public | function | Gets the configuration target identifier for the entity. | 2 |
EntityInterface:: |
public | function | Gets the entity type definition. | 2 |
EntityInterface:: |
public | function | Gets the ID of the type of the entity. | 2 |
EntityInterface:: |
public | function | Gets the original ID. | 2 |
EntityInterface:: |
public | function | Gets a typed data object for this entity object. | 2 |
EntityInterface:: |
public | function | Indicates if a link template exists for a given key. | 2 |
EntityInterface:: |
public | function | Gets the identifier. | 2 |
EntityInterface:: |
public | function | Determines whether the entity is new. | 2 |
EntityInterface:: |
public | function | Gets the label of the entity. | 2 |
EntityInterface:: |
public | function | Gets the language of the entity. | 2 |
EntityInterface:: |
public | function | Deprecated way of generating a link to the entity. See toLink(). | 2 |
EntityInterface:: |
public static | function | Loads an entity. | 2 |
EntityInterface:: |
public static | function | Loads one or more entities. | 2 |
EntityInterface:: |
public | function | Acts on a created entity before hooks are invoked. | 2 |
EntityInterface:: |
public static | function | Acts on deleted entities before the delete hook is invoked. | 2 |
EntityInterface:: |
public static | function | Acts on loaded entities. | 3 |
EntityInterface:: |
public | function | Acts on a saved entity before the insert or update hook is invoked. | 2 |
EntityInterface:: |
public static | function | Changes the values of an entity before it is created. | 2 |
EntityInterface:: |
public static | function | Acts on entities before they are deleted and before hooks are invoked. | 2 |
EntityInterface:: |
public | function | Acts on an entity before the presave hook is invoked. | 2 |
EntityInterface:: |
public | function | Gets a list of entities referenced by this entity. | 2 |
EntityInterface:: |
public | function | Saves an entity permanently. | 2 |
EntityInterface:: |
public | function | Sets the original ID. | 2 |
EntityInterface:: |
public | function | Gets an array of all property values. | 3 |
EntityInterface:: |
public | function | Generates the HTML for a link to this entity. | 2 |
EntityInterface:: |
public | function | Gets the URL object for the entity. | 2 |
EntityInterface:: |
public | function | Gets a list of URI relationships supported by this entity. | 2 |
EntityInterface:: |
public | function | Gets the public URL for this entity. | 2 |
EntityInterface:: |
public | function | Gets the URL object for the entity. | 2 |
EntityInterface:: |
public | function | Gets the entity UUID (Universally Unique Identifier). | 2 |
RefinableCacheableDependencyInterface:: |
public | function | Adds a dependency on an object: merges its cacheability metadata. | 1 |
RefinableCacheableDependencyInterface:: |
public | function | Adds cache contexts. | 1 |
RefinableCacheableDependencyInterface:: |
public | function | Adds cache tags. | 1 |
RefinableCacheableDependencyInterface:: |
public | function | Merges the maximum age (in seconds) with the existing maximum age. | 1 |
SynchronizableInterface:: |
public | function | Returns whether this entity is being changed as part of a synchronization. | 1 |
SynchronizableInterface:: |
public | function | Sets the status of the synchronization flag. | 1 |
ThirdPartySettingsInterface:: |
public | function | Gets the list of third parties that store information. | 5 |
ThirdPartySettingsInterface:: |
public | function | Gets the value of a third-party setting. | 5 |
ThirdPartySettingsInterface:: |
public | function | Gets all third-party settings of a given module. | 5 |
ThirdPartySettingsInterface:: |
public | function | Sets the value of a third-party setting. | 5 |
ThirdPartySettingsInterface:: |
public | function | Unsets a third-party setting. | 5 |