underpin / cron-job-loader
Cron Job Loader for Underpin
Installs: 385
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/underpin/cron-job-loader
Requires
- underpin/underpin: ^2.0
This package is auto-updated.
Last update: 2025-09-25 05:44:15 UTC
README
Loader That assists with adding cron jobs menus to a WordPress website.
Installation
Using Composer
composer require underpin/loaders/cron-jobs
Manually
This plugin uses a built-in autoloader, so as long as it is required before Underpin, it should work as-expected.
require_once(__DIR__ . '/underpin-cron-jobs/cron-jobs.php');
Setup
- Install Underpin. See Underpin Docs
- Register new cron jobs menus as-needed.
Example
A very basic example could look something like this.
underpin()->cron_jobs()->add( 'test', [ 'action_callback' => '__return_true', 'name' => 'Event Name', 'frequency' => 'daily', 'description' => 'The description', ] );
Alternatively, you can extend Cron_Job
and reference the extended class directly, like so:
underpin()->cron_jobs()->add('cron-job-key','Namespace\To\Class');