Scheduled Executable
Categories
Component ID
2903186
Component name
Scheduled Executable
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Downloads
392
Component created
Component changed
Component body
This module allows actions and other executable plugins to be scheduled for execution at a future time.
It uses a content entity type, scheduled_executable, to store the details of the plugin to execute.
Scheduled executables (SE) can be queried, inspected, and deleted prior to execution. Multiple scheduled items that are for the same execution time can be resolved at once, allowing priority logic to be applied.
Example:
// Create an instance of an executable plugin such as an action.
$action = $this->actionPluginManager->createInstance('my_action', ['config' => 'value']);
// Create a scheduled_executable.
$scheduled_executable = ScheduledExecutable::create()
->setExecutablePlugin('action', $action)
->setTargetEntity($my_entity)
->setExecutionTime(12345678);
$scheduled_executable->save();
