Skip to content

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.

License

Notifications You must be signed in to change notification settings

rubix-studios-pty-ltd/rubix-cronjob-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cron Job Automation Script

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.

Features

  • Creates multiple cron jobs per website.
  • Prevents duplicate job creation via local logging (cron-job-log.json).
  • Configurable job schedules.
  • Supports Australia/Sydney timezone.

Requirements

  • Node.js v18 or later
  • API Key from cron-job.org

Setup

  1. Install dependencies:
pnpm install
  1. Copy the example environment file and configure:
cp .env.sample .env
  1. Edit .env and add:
API_KEY=your_api_key_here
BUSINESS_NAME=Your Business Name
WEBSITE_URL=https://yourwebsite.com

Usage

Run the script:

node index.js

This will:

  • Create the predefined cron jobs.
  • Store job details in cron-job-log.json.

Endpoints

Notes Existing jobs are automatically skipped based on the log. All jobs are scheduled under the Australia/Sydney timezone.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support or inquiries:

Author

Rubix Studios Pty. Ltd.
https://rubixstudios.com.au

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published