Zoomed Image

How to Set Up a Scheduled Batch Job

xAssets Configuration Guide
How To

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:

  1. Navigate to Admin > Transformations.
  2. Open the transformation you want to schedule.
  3. Run it manually from the Transformation Editor.
  4. Check the result at Admin > Batch > Batch Jobs and confirm it completed successfully.

Step 2: Open the Schedule Tab

  1. In the Transformation Editor, click the Schedule tab.
  2. 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

  1. Save the transformation.
  2. To verify the schedule is active, navigate to Admin > Transformations > Scheduled Transformations and confirm your transformation appears in the list.
  3. Optionally, set the first run to a time a few minutes in the future to verify it fires correctly.
  4. 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:

  1. The batch service checks for due schedules every few minutes.
  2. When a schedule is due, it launches the transformation as a background batch job.
  3. The job runs without user involvement. Progress is visible in Admin > Batch > Batch Jobs.
  4. On completion, the status updates to Completed or Failed.
  5. 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:

  1. Check the Batch Service -- open Windows Services on the server and verify the xAssets Batch Service is running.
  2. Check the schedule is enabled -- open the transformation's Schedule tab and confirm the Enabled checkbox is checked.
  3. Check for failed previous runs -- look at the Batch Jobs list for error messages from recent runs.
  4. Check the server clock -- schedules use server local time. Ensure the server time is correct.
  5. 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