Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tlovett1/wp-cron-node
Run WordPress cron with Node.js and WP-CLI
https://github.com/tlovett1/wp-cron-node
Last synced: 4 days ago
JSON representation
Run WordPress cron with Node.js and WP-CLI
- Host: GitHub
- URL: https://github.com/tlovett1/wp-cron-node
- Owner: tlovett1
- Created: 2014-10-09T15:26:46.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-16T20:31:02.000Z (about 10 years ago)
- Last Synced: 2024-10-19T07:37:21.745Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 131 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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](http://wp-cli.org/commands/cron/event/run/).
## Installation
1. Make sure you have [Node.js](http://nodejs.org/) and [npm](https://www.npmjs.org/) installed.
1. Install [WP-CLI](http://wp-cli.org/).
1. Install the wp-cron-node npm package with the following shell command:```
npm install -g wp-cron-node
```
1. Disable WordPress cron. By adding the following to your ```wp-config.php``` file:```php
define( 'DISABLE_WP_CRON', true );
```## Usage
You can run the command without any arguments from within the root of a WordPress installation with the following shell
command:```
wp-cron-node
```You can also specify a relative or absolute path to a WordPress installation:
```
wp-cron-node ../wordpress
```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
```## License
This project is licensed under the [MIT](http://opensource.org/licenses/MIT) license.