---
sourceDocument: Brazil Employee Service Management
sourceDocumentLink: https://www.servicenow.com/docs/r/employee-service-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Employee Service Management

ft:clusterId :

    - emplsm

bundleId :

    - emplsm

workflow :

    - Employee


---

# Workplace planned maintenance scheduled job

# Workplace planned maintenance scheduled job {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Workplace planned maintenance scheduled job

TheWorkplace Planned Maintenance Nightly Runscheduled job automates the creation of maintenance cases based on configured schedules.
It generates cases for both duration-based and meter-based maintenance plans, including pre-creation of cases when the schedule duration is less than a day.
This helps ensure timely maintenance activities aligned with workplace asset and location requirements.
Show full answer Show less  

## Key Features

* **Duration-based case creation:** The job processes active maintenance plans with upcoming run times, creating cases based on configured durations. It supports pre-creating cases up to two days ahead, factoring in system and agent time zones.
* **Meter-based case creation:** It monitors asset meter values against scheduled thresholds and generates maintenance cases when asset readings exceed planned values.
* **Template association:** Cases are created only if the maintenance schedule has an associated template from the Workplace Maintenance Service Configuration. Multiple templates can be linked to a maintenance plan to customize case generation.
* **Lead time configuration:** For duration-based schedules, a minimum lead time can be set to determine how far in advance cases are created (e.g., lead time of 1 creates cases one day ahead).

## How It Works

* The job fetches active plan records based on next run time or meter readings.
* It verifies the presence of templates in the Workplace Maintenance Service Configuration table linked to each plan.
* If templates exist, the job creates corresponding maintenance cases and updates the next run time or value for the plan.
* If no template is associated, the job skips to the next plan record in the queue.
* For schedules shorter than a day, the job creates multiple cases per asset or location to cover the full day accordingly.

## Practical Benefits for ServiceNow Customers

By using this scheduled job, ServiceNow customers can automate and streamline their workplace asset maintenance processes, ensuring maintenance activities are initiated on time without manual intervention. The ability to pre-create cases based on time zones and lead time settings helps align maintenance efforts with operational needs, reducing downtime and improving asset reliability. Additionally, leveraging templates allows consistent case creation aligned with organizational policies.  
The scheduled Job Workplace Planned Maintenance Nightly Run runs at the configured time and creates maintenance cases. It also pre-creates maintenance cases when the scheduled duration
is less than a day.

The scheduled job can pre-create cases for day and up to two days ahead of the scheduled time. This is based on the time difference between the system time zone where the job is running, and the workplace agent time zone working on
the cases.  
The scheduled job Workplace Planned Maintenance Nightly Run performs the following:

* Creates duration-based cases.
* Creates meter-based cases.
{#sch-job-planned-nightly__ul_z4z_yts_qzb}

The scheduled job can also pre-create maintenance cases when the schedule configured is less than a day. The duration is based on your system time zone settings. For example, if you have a maintenance schedule of six hours, it
creates the following number of maintenance cases:  
* For a six-hour schedule, four maintenance cases are created for each maintenance asset or location in a day.
* For a six-hour schedule, eight maintenance cases are created for two maintenance assets or locations in a day (four cases for each).  
  Figure 1. Workplace Maintenance cases
* For a six-hour schedule, 12 maintenance cases are created for three maintenance assets or locations (four cases for each).
{#sch-job-planned-nightly__ul_axj_2tj_szb}  
When the scheduled job runs, it creates maintenance cases only for those planned records that have a template associated to a maintenance schedule.  
Note:  
When a maintenance schedule is created, it picks up a template from the Workplace maintenance service configuration table (sn_wsd_maintenance_service_config). Based on your requirements, associate a template to a plan record. Multiple templates can be created and associated to a maintenance plan. For more information, see [Create a workplace template configuration](https://www.servicenow.com/docs/x1CTK0TUj3vA0APcEBlzsQ "Define a template that must be applied to fulfill a workplace case. Set conditions based on common employee responses for requests. The template will be applied to those workplace cases that match the conditions specified.").

## Duration-based cases {#sch-job-planned-nightly__section_xmn_b5s_qzb}

For duration-based cases, the Workplace Planned Maintenance Nightly Run scheduled job performs the following:

* Fetches all active plan records having the Next run time duration.
* Filters out plan records where the Next run time is 48 hours or less than a day.  
  Figure 2. Schedule job Next run time
* Checks for an entry in the Workplace Maintenance Service Configuration (sn_wsd_maintenance_service_config) table.
* Gets all records from the Workplace Maintenance Service Configuration table.
* For each record in the Workplace Maintenance Service Configuration table, the schedule for the current plan record must have a template associated to it.
  * If there's a template, the scheduled job creates a maintenance case and updates the Next run time in the Workplace Maintenance Service Configuration table for a plan record.
  * If there's no template associated to a plan record, the scheduled job fetches the next plan record in a queue.
  {#sch-job-planned-nightly__ul_crc_ptw_5zb}
{#sch-job-planned-nightly__ul_znb_l5s_qzb}  
Note:  
When defining a duration-based maintenance schedule, you can define the Minimum lead time in days (takes integer-based values). For example, If if the lead time is 0, it indicates that the cases for the current day are created today itself. But if the lead time is 1, the cases were created yesterday, that is, the cases are generated one day ahead of the schedule. The Next run time duration has the lead time value defined for a schedule. For more information, see [Create or copy a maintenance schedule](https://www.servicenow.com/docs/ZEk8YD1CJmeFqJAxvrVYSQ "After creating a maintenance plan, define a maintenance schedule for a maintenance plan. Define duration or meter-based schedules for your assets or locations on a daily, weekly, monthly, or yearly basis.").

## Meter-based cases {#sch-job-planned-nightly__section_uqf_vws_qzb}

For meter-based cases, the Workplace Planned Maintenance Nightly Run scheduled job performs the following:

* The scheduled job fetches all active plan records having a Next run value.
* For each plan record, the Next run value depends on the Field name value. The Field value is available when you're creating a meter-based schedule.

  For
  more information, see in [Create or copy a maintenance schedule](https://www.servicenow.com/docs/ZEk8YD1CJmeFqJAxvrVYSQ "After creating a maintenance plan, define a maintenance schedule for a maintenance plan. Define duration or meter-based schedules for your assets or locations on a daily, weekly, monthly, or yearly basis.").
* The scheduled job retrieves the value of the Field name from the Asset (sn_ent_asset) table and compares it with the Next run value for a plan record.
* The schedule job checks if the Next run Value is less than the actual value in the Asset table and proceeds further.
* if the Next run value is more, it fetches the next plan record in a queue.
* The maintenance schedule for a current plan record must have an entry in the Workplace Maintenance Service Configuration (sn_wsd_maintenance_service_config) table.
* Gets all the records from the Workplace Maintenance Service Configuration table for that schedule in a Plan record.
* For each record in the Workplace Maintenance Service Configuration table, the schedule for the current plan record must have a template associated to it.
  * If there's a template associated to a maintenance schedule, the schedule job creates a workplace maintenance case and updates the Next run value for a plan record.
  * If there's no template associated to a maintenance schedule, the scheduled job picks up the next plan record in a queue.
  {#sch-job-planned-nightly__ul_f2b_ktw_5zb}
{#sch-job-planned-nightly__ul_otg_xws_qzb}
**Previous topic:** [Create or copy a maintenance schedule](https://www.servicenow.com/docs/ZEk8YD1CJmeFqJAxvrVYSQ "After creating a maintenance plan, define a maintenance schedule for a maintenance plan. Define duration or meter-based schedules for your assets or locations on a daily, weekly, monthly, or yearly basis.")  
**Next topic:** [Create workplace services](https://www.servicenow.com/docs/~KqlDe8eFfWzvsUoFUbiMQ "Create Workplace services like catering, office supply, parking, or any other service. Associate this service to a default general request template.")

