How to create scheduled Automation Services jobs using the command line (CLI) in TIBCO Spotfire Automation services version 10 and higher

How to create scheduled Automation Services jobs using the command line (CLI) in TIBCO Spotfire Automation services version 10 and higher

book

Article ID: KB0074705

calendar_today

Updated On:

Products Versions
Spotfire Automation Services 10.0 and higher

Description

Starting TIBCO Spotfire version 10 and higher it is possible to create Automation Services jobs using the command line (CLI).

Environment

All supported Operating systems.

Resolution

- Create a JSON file on TIBCO Spotfire server machine. Refer the steps below

NOTE:
A ". JSON" file conforming to the following structure must be created and saved locally before running the create-scheduled-job command. You may add as many schedules as necessary.

Example:
1. Open "notepad.exe" and paste the below sample code as per the manual https://docs.tibco.com/pub/spotfire_server/10.0.0/doc/html/TIB_sfire_server_tsas_admin_help/GUID-7F054FD3-9B7C-4AEE-8005-A8E238FDB461.html
-------------------------------------------------
[ { "libraryItemPath" : "/asjob/job1",
"ruleType" : "asjob",
"schedules" : [
{
"startTime" : "17:00:00",
"daysOfTheWeek" : [ "SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY" ],
"timeZone" : "America/Los_Angeles"
},
]}
]
-------------------------------------------------

2. Save this file with ".JSON" extension.
3. Browse to "C:\tibco\tss\10.X.0\tomcat\bin" on TIBCO Spotfire server machine and execute create-scheduled-jobs command

Example:
config create-scheduled-jobs -p C:\j1.json

Parameter <-p value | --local-file-path=value> - Provide the full path to the local JSON file.
: NtibcoNtssNiO.Ø.ONtoncatNbin>config create—scheduled—jobs  001 password:  Inported i out of I  —p C:xji.json

Below are some optional parameters to be used in the command.
-----------------------------------------------------------------------------------------
[-b value | --bootstrap-config=value]
[-t value | --tool-password=value]
[-k value | --keystore-file=value]
[-e <true|false> | --enabled=<true|false>]
[-s value | --site-name=value]

NOTE: From Spotfire server 10.3 onwards, browse to "C:\tibco\tss\10.X.0\tomcat\spotfire-bin" on TIBCO Spotfire server machine for executing the command.

JSON files parameters and their description:
-------------------------------------------------------------------------
libraryItemPath     : The path to the Automation Services job to be scheduled.
ruleType                : " asjob ", for Automation Services job, is currently the only option.
startTime              : The time, in the format HH:MM:SS, that the job should run.
daysOfTheWeek  : The days of the week that the job should run (at the time specified in the previous parameter).
timeZone              :  Time zone, in the Area/City format, for the times that the job should run. Use the time zone names that are listed in the IANA (Internet Assigned Numbers Authority) Time Zone Database at https://www.iana.org/time-zones.
-------------------------------------------------------------------------

NOTE:
Scenario's like scheduling Automation Job monthly/weekly is not possible using Command Line or Automation Job scheduler. In such cases scheduling can be done using Windows Task scheduler.

Refer to the below article for more details.
https://support.tibco.com/s/article/Tibco-KnowledgeArticle-Article-45265

Issue/Introduction

The article describes how to create scheduled Automation Services jobs using the command line (CLI)

Additional Information

For creating scheduled Automation service jobs using the Command line
https://docs.tibco.com/pub/spotfire_server/10.0.0/doc/html/TIB_sfire_server_tsas_admin_help/GUID-7F054FD3-9B7C-4AEE-8005-A8E238FDB461.html

To schedule Automation Services jobs through Web UI, refer the below link.
https://docs.tibco.com/pub/spotfire_server/10.0.0/doc/html/TIB_sfire_server_tsas_admin_help/GUID-BB0F25D5-EE16-4C2E-BD3B-BA09419E66FB.html