Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
Scheduler Demo Extension
This sample extension demonstrates how to use the cap:scheduler.manage capability to programmatically create, update, and delete scheduled tasks for your extension.
Features
- Self-Configuration: The extension sets up its own scheduled tasks when
/api/setupis called - Schedule Management: List, create, and delete schedules through the UI
- Schedulable Endpoints: Demonstrates endpoints marked as
schedulable: truein the manifest
Capabilities Used
cap:scheduler.manage- Manage extension schedulescap:log.emit- Write logscap:context.read- Read execution context
Endpoints
| Method | Path | Schedulable | Description |
|---|---|---|---|
| GET | /api/status |
Yes | Health check endpoint |
| POST | /api/setup |
No | Auto-configure schedules |
| GET | /api/schedules |
No | List all schedules |
| DELETE | /api/schedules/:id |
No | Delete a schedule |
| POST | /api/heartbeat |
Yes | Scheduled heartbeat |
How It Works
Self-Configuration Pattern
When the extension's /api/setup endpoint is called, it:
- Discovers available schedulable endpoints via
host.scheduler.getEndpoints() - Checks for existing schedules to avoid duplicates
- Creates new schedules for the heartbeat and status endpoints
- Returns a summary of what was configured
// Example: Creating a schedule from within the extension
const result = await host.scheduler.create({
endpoint: 'POST /api/heartbeat',
cron: '*/5 * * * *', // Every 5 minutes
timezone: 'UTC',
enabled: true,
name: 'Heartbeat Check',
payload: JSON.stringify({ source: 'auto-setup' }),
});
Manifest Configuration
Endpoints must be marked as schedulable: true in the manifest to be eligible for scheduling:
{
"api": {
"endpoints": [
{ "method": "POST", "path": "/api/heartbeat", "handler": "dist/main", "schedulable": true }
]
}
}
Building
npm install
npm run build
npm run pack # Creates a deployable bundle
Testing
npm test
Usage in Production
- Install the extension with the
cap:scheduler.managecapability enabled - Navigate to the extension's UI via the app menu
- Click "Setup Schedules" to auto-configure the scheduled tasks
- Use "Refresh List" to view current schedules
- Delete schedules as needed through the UI
Notes
- Extensions can only manage their own schedules
- Schedules are scoped to the extension installation (tenant + extension)
- The
runNowfunctionality remains admin-only and is not exposed to extensions