This script automates the creation of recurring HTTP requests (cron jobs) using the cron-job.org API. It is designed to simplify setting up automated tasks for websites, including WordPress cron triggers and cache preloading endpoints for Seraphine Accelerator.
- Creates multiple cron jobs per website.
- Prevents duplicate job creation via local logging (
cron-job-log.json
). - Configurable job schedules.
- Supports Australia/Sydney timezone.
- Node.js v18 or later
- API Key from cron-job.org
- Install dependencies:
pnpm install
- Copy the example environment file and configure:
cp .env.sample .env
- Edit
.env
and add:
API_KEY=your_api_key_here
BUSINESS_NAME=Your Business Name
WEBSITE_URL=https://yourwebsite.com
Run the script:
node index.js
This will:
- Create the predefined cron jobs.
- Store job details in
cron-job-log.json
.
Notes Existing jobs are automatically skipped based on the log. All jobs are scheduled under the Australia/Sydney timezone.
This project is licensed under the MIT License - see the LICENSE file for details.
For support or inquiries:
- X: @rubixvi
- Facebook: rubixvi
- Website: Rubix Studios
Rubix Studios Pty. Ltd.
https://rubixstudios.com.au