WP Cron Node
A simple Node command to run WordPress cron via PHP CLI. Running this command will execute WordPress cron events that are due for execution. If you want to execute cron events regardless of schedule, use WP-CLI cron event run.
Install the wp-cron-node npm package with the following shell command:
npm install -g wp-cron-node
Disable WordPress cron. By adding the following to your
define( 'DISABLE_WP_CRON', true );
You can run the command without any arguments from within the root of a WordPress installation with the following shell command:
You can also specify a relative or absolute path to a WordPress installation:
If you are running WordPress multi-site, you might want to change the site context by passing in a url:
wp-cron-node . http://example.com/site2
This project is licensed under the MIT license.