Host GS: Configure the Task Scheduler

Document created by RSA Information Design and Development on Nov 23, 2016
Version 1Show Document
  • View in full screen mode
  

The scheduler File

One of the files available for editing in the Service Config view > Files tab is scheduler.  This file configures the built-in task scheduler for a service. The task scheduler can automatically send messages at predefined intervals or specific times of the day.

Scheduler Task Syntax

A task line in the scheduler file consists of the following syntax, where <Value> has no spaces:

<ParamName>=<Value>

if <Value> has any spaces, this is the syntax:

<ParamName>="<Value>"

In each task line, these guidelines apply:

  • Parameter time or one of the interval parameters (secondsminutes or hours) is required.
  • Escape special characters with a \ (backslash).

Task Line Parameters

The following task line parameters are accepted by the scheduler.

                                                     
SyntaxDescription
daysOfWeek: <string, optional, {enum-any:sun|mon|tue|wed|thu|fri|sat|all}>The days of week to execute a task. The default value is all.
deleteOnFinish: <bool, optional>Delete the task when it has successfully finished.
hours: <uint32, optional, {range:1 to 8760}>The number of hours between executions.
logOutput: <string, optional>Output the response to log using the specified module name.
minutes: <uint32, optional, {range:1 to 525948}>The number of minutes between executions.
msg: <string>The message to send the node.
params: <string, optional>The parameters for the message.
pathname: <string>The path of the node that receives the message.
seconds: <uint32, optional, {range:1 to 31556926}>The number of seconds between executions.
time: <string>The time of execution in HH::MM:SS format (local time of this server).
timesToRun: <uint32, optional>How many times to run since service start, 0 = means unlimited (default).

Messages

The following are the message strings to use in the Task Scheduler msg parameter.

                                 
MessageDescription
addInterAdd a task to run at a defined interval. For example, this message runs the /index save command every 6 hours:

addInter hours=6 pathname=/index msg=save
addMil
 

Add a task to run at a specific time of day or even day(s) of the week. For example, this message runs the /index save command at 1AM every business day:

addMil time= 01:00:00 pathname=/index
msg=save daysOfWeek=mon,tue,wed,thu,fri

delSchedDeletes an existing scheduled task. The id parameter of the task must be retrieved from the print message.
printPrints all scheduled tasks.
replaceAssign all scheduled tasks in one message, deleting any existing tasks.
saveTell a node to save

Sample Task Line

The  following example task line in the scheduler file downloads the feeds package file (feeds.zip) to the selected Decoder every 120 minutes from the feeds host server:

minutes=120 pathname=/parsers msg=feed params="type\=wget file\=http://feedshost/nwlive/feeds.zip"

You are here
Table of Contents > Service Procedures > Edit Core Service Configuration Files > Configure the Task Scheduler

Attachments

    Outcomes