ashraf1395
Honored Contributor

You can use databricks sdk or databricks rest api to achieve this

Databricks sdk - in the backend uses API only but it is more secure. I will share you the links to both , you can choose according to your usecase

Databricks api
- If the job is already created you want to update it to add schedule  : https://docs.databricks.com/api/workspace/jobs/update#new_settings-schedule

- if you want to create a complete new job : https://docs.databricks.com/api/workspace/jobs/create#schedule


databricks sdk
- If the job is already created you want to update it to add schedule : You can using list function  and get your workflow and then or you can directly use the update function and send the job_params in there.

- if you want to create a new job : you can use the create function
Using SDK method is a little bit complex bcz you will need to find the right set of attributes and functions to use but worth trying you can even send the link to llm and ask it help. 
https://databricks-sdk-py.readthedocs.io/en/latest/workspace/jobs/jobs.html




View solution in original post