Skip to main content
Version: 5.7.0

ScheduleRunScriptMillisUTC

Schedules a script to run at given UTC time.

ServiceOperation
scriptSCHEDULE_CLOUD_SCRIPT

Method Parameters

ParameterDescription
scriptNameThe name of the script with its absolute path to be run.
scriptDataData to be sent to the script in JSON format.
startDateInUTCThe start date. (date in millis UTC).

Usage

http://localhost:3000
string scriptName = "path/to/script1";
string scriptData = "{\"parm\":\"value\"}";
int startDateInUTC = 1437579786000;
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.ScriptService.ScheduleRunScriptMillisUTC(scriptName, scriptData, startDateInUTC, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"result": {},
"scriptName": "testScript",
"jobId": "48266b95-d197-464d-bb6b-da70aa1e22a9",
"runState": "Scheduled",
"description": null,
"gameId": "10170",
"runEndTime": 0,
"parameters": {
"testParm1": 1
},
"runStartTime": 0,
"scheduledStartTime": 1437576422378
}
}