Scheduled Tasks
Automate recurring operations with scheduled tasks. Run reports, sync data, perform maintenance, and execute custom scripts on a defined schedule without manual intervention.
Task Dashboard
| Metric | Description |
|---|---|
| Active Tasks | Number of scheduled tasks currently enabled |
| Runs Today | Total task executions completed today |
| Failed (24h) | Tasks that failed in the last 24 hours |
| Paused | Tasks temporarily paused |
Task List
| Column | Description |
|---|---|
| Task Name | Display name of the task |
| Type | Report, Sync, Maintenance, Custom |
| Schedule | Cron expression or friendly schedule |
| Status | Active, Paused, or Disabled |
| Last Run | Last execution timestamp |
| Last Result | Success, Failed, or Partial |
| Next Run | Next scheduled execution |
Task Types
Scheduled Reports
Generate and deliver reports automatically. Send license utilization, security posture, or compliance reports to stakeholders.
- Email PDF/CSV to distribution list
- Upload to SharePoint document library
- Post to Teams channel
Data Sync
Synchronize data between systems. Keep tenant data fresh, sync with PSA tools, or update external databases.
- Tenant health refresh
- License inventory sync
- PSA customer sync
- User directory cache refresh
Maintenance Tasks
Routine housekeeping operations. Clean up stale data, archive old records, or verify system health.
- Stale guest user cleanup
- Inactive device report
- License reclamation check
- Security baseline compliance check
Custom Scripts
Execute PowerShell or custom API workflows on schedule. Build complex automation for specific business needs.
Creating a Scheduled Task
Task Name and Description
Descriptive name explaining what the task does. Include scope (e.g., “Daily License Report - All Tenants”).
Task Type
Select the operation type and configure specific settings.
Schedule
Define when the task runs:
- Every X minutes/hours — Recurring interval
- Daily at time — Once per day
- Weekly on days — Specific days of week
- Monthly on date — Specific day of month
- Cron expression — Advanced scheduling
Scope
Which tenants or resources the task applies to:
- All tenants
- Specific tenants
- Tenants with specific tags
Notifications
Alert on task completion:
- Email on failure
- Email on success
- Teams notification
- Webhook callback
Schedule Examples
0 6 * * *— Every day at 6:00 AM0 9 * * 1— Every Monday at 9:00 AM0 */4 * * *— Every 4 hours0 8 1 * *— First of every month at 8:00 AM0 17 * * 5— Every Friday at 5:00 PM
Execution History
View detailed history for each task execution:
- Start and end timestamps
- Duration of execution
- Success/failure status
- Items processed count
- Error details if failed
- Output/results download
Best Practices
- Stagger task times — Avoid scheduling all tasks at the same time to prevent resource contention
- Consider time zones — Schedule based on when results are needed. Reports for US team at 8 AM ET, not UTC
- Monitor failures — Set up failure notifications. Investigate recurring failures promptly
- Review regularly — Audit scheduled tasks quarterly. Disable or remove tasks no longer needed
API Reference
GET /api/automation/scheduled-tasks— List all scheduled tasksPOST /api/automation/scheduled-tasks— Create scheduled taskPOST /api/automation/scheduled-tasks/:id/run— Trigger task manuallyGET /api/automation/scheduled-tasks/:id/history— Get execution historyPUT /api/automation/scheduled-tasks/:id/status— Pause/resume task