I'm just looking to add a job to execute some code every hour. The documentation is somewhat unclear how to add jobs. It says:
Add a job.
$job = array(
'callback' => 'mymodule_unpublish_nodes',
'type' => 'story',
'id' => 12,
'period' => 3600,
'periodic' => TRUE,
);
job_scheduler()->set($job);
But where do I add this code? Is there a hook I should implement to execute this code? Just run it once? Also, what are the units for the 'period', seconds, minutes?
Closed: outdated
2.0
Documentation
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.