Modules@robinpath/scheduler

@robinpath/scheduler

0.1.0Public

Schedule and run recurring or one-time tasks with cron expressions, pause/resume support, and execution history

@robinpath/scheduler

Schedule and run recurring or one-time tasks with cron expressions, pause/resume support, and execution history

Category Functions Auth License

Why use this module?

The scheduler module lets you:

  • Schedule a recurring task using a cron expression
  • Schedule a one-time task at a specific date/time or after a delay in ms
  • Cancel a scheduled task by id
  • Cancel all scheduled tasks
  • List all scheduled tasks with their next run times

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/scheduler

Quick Start

No credentials needed — start using it right away:

scheduler.once "sendEmail" "2025-12-31T23:59:00Z" { action: "sendNewYearEmail" }

Available Functions

FunctionDescription
scheduler.scheduleSchedule a recurring task using a cron expression
scheduler.onceSchedule a one-time task at a specific date/time or after a delay in ms
scheduler.cancelCancel a scheduled task by id
scheduler.cancelAllCancel all scheduled tasks
scheduler.listList all scheduled tasks with their next run times
scheduler.getGet info about a specific scheduled task
scheduler.pausePause a scheduled task (keeps it but stops execution)
scheduler.resumeResume a paused task
scheduler.isRunningCheck if a task is currently active (not paused and scheduled)
scheduler.nextRunGet the next run time for a scheduled task
scheduler.historyGet execution history for a task

Examples

Schedule a one-time task at a specific date/time or after a delay in ms

scheduler.once "sendEmail" "2025-12-31T23:59:00Z" { action: "sendNewYearEmail" }

Cancel a scheduled task by id

scheduler.cancel "cleanup"

Cancel all scheduled tasks

scheduler.cancelAll

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/scheduler";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  scheduler.once "sendEmail" "2025-12-31T23:59:00Z" { action: "sendNewYearEmail" }
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/scheduler
Version0.1.0
LicenseMIT
Unpacked Size5.7 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

devops