How to Set Up a Scheduled Batch Job
This page explains how to schedule a transformation to run automatically at regular intervals as a batch job. Scheduled batch jobs are used for recurring tasks such as nightly data imports, weekly compliance calculations, and periodic notifications.
Prerequisites
- You must have Configuration-level access or transformation editing permissions.
- The transformation you want to schedule must already exist and work correctly when run manually.
- The xAssets Batch Service must be running on the server (it is a Windows service).
Step 1: Verify the Transformation Works Manually
Before scheduling a transformation, always verify it runs correctly on demand:
- Navigate to Admin > Transformations.
- Open the transformation you want to schedule.
- Run it manually from the Transformation Editor.
- Check the result at Admin > Batch > Batch Jobs and confirm it completed successfully.
Step 2: Open the Schedule Tab
- In the Transformation Editor, click the Schedule tab.
- This tab shows the schedule configuration for the transformation.
Step 3: Configure the Schedule
Set the following fields:
| Field | Description |
|---|---|
| Enabled | Check this box to activate the schedule. |
| Frequency | Choose how often to run: Daily, Weekly, or Monthly. |
| Time | Set the time of day to run, in server local time. |
| Day of Week | For weekly schedules, select which day of the week to run. |
| Day of Month | For monthly schedules, select which day of the month to run. |
Step 4: Save and Verify
- Save the transformation.
- To verify the schedule is active, navigate to Admin > Transformations > Scheduled Transformations and confirm your transformation appears in the list.
- Optionally, set the first run to a time a few minutes in the future to verify it fires correctly.
- Check Admin > Batch > Batch Jobs after the scheduled time to confirm the job ran and completed.
How Scheduled Jobs Execute
The xAssets Batch Service handles scheduled job execution:
- The batch service checks for due schedules every few minutes.
- When a schedule is due, it launches the transformation as a background batch job.
- The job runs without user involvement. Progress is visible in Admin > Batch > Batch Jobs.
- On completion, the status updates to Completed or Failed.
- A log of all previous executions is stored in the Batch History tab of the transformation.
Monitoring Scheduled Jobs
Check the batch job list regularly to ensure:
- Scheduled jobs are running at the expected times.
- No jobs are stuck in "Running" status for abnormally long periods.
- Failed jobs are investigated and resolved -- click on a failed job to see the error details.
Troubleshooting
If a scheduled job is not running:
- Check the Batch Service -- open Windows Services on the server and verify the xAssets Batch Service is running.
- Check the schedule is enabled -- open the transformation's Schedule tab and confirm the Enabled checkbox is checked.
- Check for failed previous runs -- look at the Batch Jobs list for error messages from recent runs.
- Check the server clock -- schedules use server local time. Ensure the server time is correct.
- Run manually first -- if the transformation has never run successfully, fix any errors before scheduling it.
Common Scheduled Tasks
| Task | Typical Schedule |
|---|---|
| Discovery data load | Every 15 minutes or hourly |
| Active Directory user sync | Daily at 2:00 AM |
| Software compliance calculation | Weekly on Monday |
| Warranty expiry notifications | Weekly on Friday |
| Data export to finance system | Monthly on the 1st |
Related Articles
- Batch Jobs Overview — viewing and managing batch jobs
- Scheduled Transformations — full reference for scheduling
- Transformations Overview — how transformations work