Schedule

pyCSM.services.session_service.schedule_service.change_properties(property_dictionary)

Takes a dictionary of properties and the values that user wants to change and changes them in the file.

Parameters
  • property_dictionary (dict) – Dictionary of the keys and values that need

  • file. (to be changed in the) –

  • {"language" (ex.) – “en-UK”, “verify”:True}

Returns

Returns the new properties dictionary.

pyCSM.services.session_service.schedule_service.disable_scheduled_task(url, tk, taskid)

Disable a scheduled task from running automatically.

Parameters
  • url (str) – Base url of csm server. ex. https://servername:port/CSM/web.

  • tk (str) – Rest token for the CSM server.

  • taskid (str) – ID of the schedule task to enable.

Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.session_service.schedule_service.enable_scheduled_task(url, tk, taskid)

Enable a scheduled task to run based off the schedule defined on the task.

Parameters
  • url (str) – Base url of csm server. ex. https://servername:port/CSM/web.

  • tk (str) – Rest token for the CSM server.

  • taskid (str) – ID of the schedule task to enable.

Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.session_service.schedule_service.get_properties()

Returns a dictionary of the current properties and their values set for the file.

pyCSM.services.session_service.schedule_service.get_scheduled_tasks(url, tk)

Returns a list of scheduled tasks defined on the server

Parameters
Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.

pyCSM.services.session_service.schedule_service.run_scheduled_task(url, tk, taskid, synchronous=False)

Run a scheduled task immediately. Synchronous value set to true if call should not return until task is complete. False if you want it to run in the asynchronous after the call completes.

Parameters
  • url (str) – Base url of csm server. ex. https://servername:port/CSM/web.

  • tk (str) – Rest token for the CSM server.

  • taskid (str) – ID of the schedule task to enable.

Returns

JSON String representing the result of the command. ‘I’ = successful, ‘W’ = warning, ‘E’ = error.