Scheduled offline caching
Summarize
Summary of Scheduled offline caching
Scheduled offline caching in ServiceNow enables field technicians to receive automated, scheduled updates to their offline data caches based on their work schedules. This ensures that mobile users have the most relevant data available without manual intervention, improving efficiency and service delivery in the field.
Show less
Key Features
- Agent Schedule Plugin Activation: To use scheduled offline caching, the
Agent Scheduleplugin (com.snc.agentschedule) must be activated. This provides the framework for scheduling offline cache updates. - Work Schedule Configuration: Work schedules for agents or technicians are created in the
Agent Work Schedules [agentworkschedule]table. These schedules drive when offline caches are generated and pushed to users. - Offline Download Schedule Entries: For mobile clients other than Mobile Agent, an entry in
Offline download schedule (syssgofflinedownloadschedule)must exist to specify the relevant table for scheduling offline cache updates. - Background Scheduled Jobs: Several background jobs manage the scheduling process:
- Populate Agents Daily Schedule Table: Runs daily to update schedules for users with background downloading enabled.
- Scheduled Download of Offline Payload: Creates events to generate the first offline payload of the day.
- Silent Push Notifications: Agents receive silent push notifications during their scheduled day to update their offline caches seamlessly.
- Tracking and Events: Offline cache generation and delivery are tracked through events in the
Events [sysevent]table. - System Properties for Configuration: Several system properties control offline caching behavior, including enabling scheduled downloads, setting time offsets for payload generation and reminders, frequency of payload refreshes, and maximum attachment size in caches.
Practical Implications for ServiceNow Customers
- Activating and configuring scheduled offline caching allows field technicians to automatically receive timely offline data updates aligned with their work hours, reducing downtime and enhancing productivity.
- Properly defining work schedules and ensuring the relevant offline download schedule entries exist is essential for accurate cache update timing.
- Customers should enable background downloading in their mobile apps to leverage scheduled offline caching fully.
- Understanding and configuring system properties allows customization of when and how offline payloads are generated, delivered, and refreshed, ensuring optimal performance and user experience.
- Monitoring event records helps administrators track offline payload generation and delivery status for troubleshooting and optimization.
Configure offline caching so your field technicians can receive scheduled updates to their offline data cache. Scheduled downloads are based on the user's work schedule.
Activate the Agent Schedule plugin
To enable and configure scheduled offline caching, the Agent Schedule plugin [com.snc.agent_schedule] must be activated. For details on plugin activation, see Activate a plugin.
Create work schedules for offline caching
For mobile clients other than Mobile Agent, ensure that an entry in Offline download schedule (sys_sg_offline_download_schedule) exists for the client type, for example, Request. This entry specifies the table that has the offline download schedules for the agents or technicians. Mobile uses the schedule from this table for scheduling offline cache generation. To populate schedules for each user, a scheduler script can be used like in Field Service Mobile.
For Mobile Agent, the entry is created when the plugin is activated. After activating the plugin, you must create work schedules for the agents or technicians to enable users to automatically receive scheduled offline caches. This can be done directly through the Agent Work Schedules [agent_work_schedule] table. For more information on how to create schedules through this table, see Create a work schedule for an agent or technician.
Based on the records from the Agent Work Schedules table, your instance runs background scheduled jobs that create schedules in the Agent Daily Schedules [agent_daily_schedule] table. Within these schedules, agents will receive a silent push sometime throughout their scheduled day.
The offline payloads that your instance generates are based on the times recorded in the Agent Daily Schedules. These can be found in the Events [sysevent] table. Use the records in the Event table to track these payloads, and info about when they are created and when they are sent to the agents.
Scheduled Jobs associated with offline caching
These scheduled jobs are automatically scheduled for only users who enable background downloading on their app. For information on how users can enable this feature, see Offline mode for mobile.
- Populate Agents Daily Schedule Table
- This job runs once daily for all users with background downloading set to true.
- Scheduled Download of Offline Payload
- This job creates an event for the first payload of the day in the [mobile_offline_payload_gen_queue] table.
Offline scheduling system properties
Use the following properties on the System Properties [sys_properties] table to configure scheduled offline caching.
| Property | Description |
|---|---|
| glide.sg.offline.scheduled_download.enabled | Enables scheduled downloading for all Mobile Agent app users. |
| glide.sg.offline.scheduled_download.cachesync_offset | Determines when your instance starts payload generation prior to schedule. Value
determines how many minutes before the user schedule payload generation begins. Note: Be sure not to set the value of this property earlier than your Mobile
Offline Scheduling job is runs. Doing so will prevent offline payloads from being
generated. |
| glide.sg.offline.scheduled_download.reminder_offset | Determines when your instance sends your users a daily reminder to manually download a cache. The instance sends this reminder only when there is no cache or the cache is expired. Value determines how many minutes before a user schedule your instance sends this reminder. |
| glide.sg.offline_payload.refresh_frequency | Determines refreshTimestamp frequency of payloads. Value represents this frequency in minutes The default value is 480. |
| glide.sg.offline.attachment.max_total_bytes | Determines the maximum size allocated for all attachments in a cache. Value is represented in Megabytes (MB). The maximum value is 2048 MB. |
For information on more offline related system properties, see, Configure offline mode behavior.