BullScheduler icon

BullScheduler

Schedule jobs to execute at specific times or after delays with webhook delivery

Overview

This node, named "BullScheduler," allows users to schedule jobs that will execute at specific times or after a specified delay. When the scheduled time arrives, the job payload is sent to a webhook URL. This functionality is useful for automating tasks such as sending reminders, triggering workflows, or executing delayed actions in external systems.

Common scenarios include:

  • Scheduling notifications or reminders to be sent at a future date/time.
  • Deferring execution of a task by a certain delay (e.g., retrying an operation after some milliseconds).
  • Triggering webhooks with custom data payloads at precise moments or after delays.

For example, you could schedule a job to send a reminder email to a user at 9 AM tomorrow, or trigger a webhook call 5 minutes after a certain event occurs.

Properties

Name Meaning
Name Job identifier. If empty, a random string like job-<random> will be generated automatically.
Execute At Schedule the job to execute at a specific date and time in ISO format.
Data JSON payload data that will be sent to the webhook when the job executes.
Advanced Options Collection of additional options:
- Delay in Ms Delay in milliseconds after which the job should execute (alternative to "Execute At").
- Webhook URL Override the default webhook URL for this specific job.

Output

The node outputs an array of items where each item contains a JSON object with the following structure:

  • jobName: The name/identifier of the scheduled job.
  • scheduled: Boolean indicating if the job was successfully scheduled.
  • response: The response from the scheduling API after creating the job.
  • scheduledAt: Timestamp (ISO string) when the job was scheduled.
  • executeAt: The scheduled execution time if provided, otherwise null.
  • delayMs: The delay in milliseconds if provided, otherwise null.
  • data: The JSON payload data sent with the job.
  • webhookUrl: The webhook URL used for this job, or null if default.

If an error occurs during scheduling for an item and the node is set to continue on failure, the output for that item will contain an error message and indicate the job was not scheduled.

The node does not output binary data.

Dependencies

  • Requires an external scheduling service accessible via HTTP API.
  • Needs an API key credential for authentication with the scheduling service.
  • The base URL and API key must be configured in the node credentials.
  • The scheduling service endpoint /job accepts POST requests to create jobs.

Troubleshooting

  • Invalid JSON in Data field: If the JSON payload in the "Data" property is malformed, the node throws an error specifying the JSON parsing issue. Ensure the JSON is valid.
  • Missing scheduling parameters: Either "Execute At" or "Delay in Ms" must be provided. If both are missing or invalid, the node throws an error instructing to provide one.
  • API request failures: Errors returned from the scheduling service (e.g., authentication errors, network issues) will cause the node to fail unless "Continue On Fail" is enabled.
  • Empty job name: If no job name is provided, the node auto-generates a unique job name to avoid conflicts.

Links and References

Discussion