question

Ozan Yilmaz avatar image
Ozan Yilmaz asked

How to run scheduled task on specific day?

Hello everyone,

Is there a way to run a scheduled task on a specific day? For example; Halloween. Every year, the task will run a cloudscript function on a specific day.

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

·
Sarah Zhang avatar image
Sarah Zhang answered

You can set the scheduled task that executes once every year. But please note, the cron expression doesn’t contain the definition of any holiday. You would need to manually query the UTC time of each holiday and set up the separate scheduled tasks for them. For example, if the tasks should be executed at 00:00 on day-of-month 1 in January (UTC), the corresponding cron expression could be something like this.

0 0 1 1 *

Please check the documentation -- Scheduled tasks quickstart - PlayFab | Microsoft Docs for more information about how to set the recurring tasks. And if you want to learn more about Cron Expression, crontab.guru provides rich information and an interactive expression builder.

10 |1200

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

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.