question

Pipeworks Truman avatar image
Pipeworks Truman asked

Create Scheduled Task that calls Azure cloudscript api

We can create a task that will run a cloudscript, but there does not appear to be any setting to have it call azure through the api alone. We would have to set this on dashboard which is not desired.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered

There is a setting that can run Azure function alone in schedule task.

  1. Create a schedule task
  2. In the Type of task field, choose Run Cloud Script Azure Function once
  3. Then you can select the Azure Function you want in the field Function name
5 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ben Vissotzky avatar image Ben Vissotzky commented ·

Can this be done through an api rather than dashboard

1 Like 1 ·
Rick Chen avatar image Rick Chen ♦ Ben Vissotzky commented ·

I’m afraid there is no such API. You need to do it in Game Manager. If you insist on using API, perhaps you can do it in 2 steps:

  1. use Create Cloud Script Task API to create a task first
  2. then use Update Task API to update the task type to “CloudScriptAzureFunctions”, and in the Parameter (object) field, you pass the Azure Function name as:

{ “CloudScriptAzureFunctionName”: “[your function name]”}

(replace [your function name] with your Azure function name.)

0 Likes 0 ·
Ben Vissotzky avatar image Ben Vissotzky Rick Chen ♦ commented ·

This does not work. The update call succesfully changes it to use azure functions, but it does not successfully update it to call the correct azure function. Is there documentation on this? I could find none regarding the usage of CloudScriptAzureFunctionName as a parameter

0 Likes 0 ·
Show more comments
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.