Question

Create_Schedule_Plan API in Python

  • 27 October 2021
  • 1 reply
  • 220 views

Hi There,

I am trying to create a schedule with python, but I have no idea what can be a valid value to insert for the crontab param.

Here is my code:

 

PS. I want the dashboard to be sent “now” and only once.

Do you have any suggestions?


This topic has been closed for comments

1 reply

Userlevel 4
Badge

You could do something like this:
 

sdk.scheduled_plan_run_once(body=models.WriteScheduledPlan(INSERTBODYHERE))

 

For the cron string, I would recommend a website like: https://crontab.guru/

 

There is also this example: https://github.com/looker-open-source/sdk-codegen/blob/main/examples/python/simple_schedule_plan.py