scheduled-jobs

Configure, manage, and debug recurring background tasks for OrangeHRM instances.

1.1k|746|Updated Jan 5, 2017
One-click install
npx skills add https://github.com/orangehrm/orangehrm --skill scheduled-jobs-orangehrm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scheduled-jobs
Source: https://github.com/orangehrm/orangehrm/tree/main/.agents/skills/scheduled-jobs
Command: npx skills add https://github.com/orangehrm/orangehrm --skill scheduled-jobs-orangehrm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OrangeHRM relies on recurring background tasks for critical operations like LDAP user sync, email queue draining, and data cleanup, but setting up, managing, and debugging these scheduled jobs requires deep knowledge of the framework's custom scheduler, host-level cron configuration, and common pitfalls that cause tasks to fail or not run at all.

Core Features & Use Cases

  • Full Scheduler Workflow Guidance: Covers end-to-end setup from host-level cron entry configuration to plugin-based task registration using OrangeHRM's SchedulerConfigurationInterface.
  • Crunz Scheduling API Reference: Documents all available fluent scheduling methods for defining cron expressions, timezone-aware task timing, and passing arguments to scheduled commands.
  • Debugging & Troubleshooting: Provides step-by-step checklists and common pitfall guidance for investigating missed, failed, or misconfigured scheduled tasks, including log analysis and error handling behavior.
  • Use Case Example: Use this skill to set up a recurring nightly data cleanup task, configure timezone-aware LDAP sync schedules, or debug why a scheduled email queue drain job is not executing as expected.

Quick Start

Use the scheduled-jobs skill to configure a recurring nightly cleanup task for your OrangeHRM instance and verify it runs correctly by checking the task scheduler log.

Frequently Asked Questions about scheduled-jobs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure cron jobs for an OrangeHRM instance?

Cron jobs in OrangeHRM are configured by setting up a host-level cron entry to trigger the framework scheduler, then registering plugin tasks via the SchedulerConfigurationInterface and defining schedules with Crunz fluent methods.

Why does my scheduled background task fail to run in OrangeHRM?

Scheduled background tasks fail to run due to misconfigured host-level cron entries, invalid Crunz schedule definitions, or execution errors. Investigate missed tasks by analyzing the ohrm_task_scheduler_log table and checking timezone-aware timing configurations.

How do I schedule timezone-aware recurring tasks using Crunz in OrangeHRM?

You can schedule timezone-aware recurring tasks in OrangeHRM by using Crunz fluent scheduling methods to define cron expressions and specify timezone-aware task timing for operations like nightly data cleanup or LDAP sync.

Does OrangeHRM log scheduled task execution outcomes and handle errors gracefully?

Yes, OrangeHRM logs scheduled task execution outcomes to the ohrm_task_scheduler_log table and handles task execution errors independently, ensuring that a failed background job does not block other scheduled tasks.

What is the best way to register a plugin's recurring background task in OrangeHRM?

The best way to register a plugin's recurring background task in OrangeHRM is by implementing the SchedulerConfigurationInterface, which allows you to define cron schedules and pass arguments to scheduled console commands.