Understanding the Replicate Scheduler JSON

Creation date: 19/02/2025 16:41    Updated: 19/02/2025 16:41
The Replication_Definition.json file generated using the exportrepository command contains information about the Replicate task scheduler. The 'scheduler' JSON object is a list with each entry being one scheduled job represented by a JSON object.


JSON Object structure

  • "name"
    • Name of the task
  • "command_id"
    • numeric value
    • 25 or 51
    • 25 means start the task. Can also mean reload depending on flags
    • 51 means stop the task
  • "schedule"
    • 6 parameters separated by a space (* * * * * *)
    • Minute
      • 0 - 59
    • Hour
      • 0 - 23
    • Date
      • 1 - 31
      • If the format is */{?} where ? is a number between 1 and 5, this means the job is scheduled for the ?th weekday (specified in the ‘Day of the week’ parameter) of each month. If ? is 5, then the job is scheduled for the last weekday of that month.
    • Month
      • 1 - 12 (Jan - Dec)
    • Day of the week
      • 1 - 7 (Mon - Sun)
      • If the format is */{?} and the ‘Date’ parameter also has the format */{^} where ‘?’ is a number between 1 and 7, and ‘^’ is a number between 1 and 5 then the job is scheduled for every ^th (last if ^ is 5) weekday (specified by ?)
      • If the format is */{?} where ‘?’ is a number between 5 and 527039 and the ‘Date’ parameter is of the standard 1 - 31 format then the job is scheduled to run every ‘?’ minutes
    • Year
      • 4 digit year format (e.g. 2025)
  • "command_requests" (These fields usually don’t have values)
    • "cleanlogs_req"
      • server
      • task
      • fts
    • "logfilerollover_req"
    • "execute_req"
      • "task"
      • "operation"
      • "flags"
        • If the value of this is “FRESH”, then the job will reload the task
    • "stoptask_req"
      • "task"
  • "enabled"
    • Boolean value indicating whether the job is active or not
    • If false, then the job has been deactivated and won’t run
    • If this key isn’t visible then it’s value is true
  • "task"
    • tasks associated with the scheduler job
    • comma separated string if multiple jobs
    • If this key isn’t visible then the scheduler job applies to all tasks
  • "is_local_time"
    • Boolean value indicating whether the time setting is set to Replicate server time
    • If this key isn’t visible then it’s value is false and the scheduler is using UTC time

Examples of the "schedule" field

  • 2 9 20 2 * 2025
    • Once on 20/2/2025 at 9:02AM
  • 4 12 * * * * 
    • Daily at 12:04PM
  • 5 9 * * 2,6 *
    • Weekly on Tuesday, Saturday at 9:05AM
  • 6 9 15 * * *
    • Monthly on the 15th of each month at 9:06AM
  • 7 9 */5 * */6 * 
    • Monthly on the last Saturday of each month at 9:07AM
  • 15 20 */3 * */3 *
    • Monthly on the 3rd Wednesday of each month at 8:15PM
  • 0 12 26 2 */5070 2025 
    • Every 3 days, 12 hours and 30 mins (5070 mins total), starting 26/2/2025 at 12:00PM (5070 = (3 * 24 * 60) + (12 * 60) + 30)
Files