We use CRON tasks to schedule notebooks, find the syntax you need to on: https://crontab.guru/
A job shouldn't last more than one hour, split your work :)
Send in production this notebook and run it, every day at 9:00 :
naas.scheduler.add(recurrence="0 9 * * *")
You can also give a path to the function and that will deploy this file instead of the current one.
naas.scheduler.add(path="path/to/my/super/notebook.ipynb", recurrence="0 9 * * *")
notif_down
: Receive an email when the notebook run fails.
notif_up
: Receive an email when the notebook runs well.
next_url
: Url to call when the notebook success, it can be any service even if an Notebook API
params = {"notif_down": "[email protected]", "notif_up": "[email protected]"}naas.scheduler.add(recurrence="0 9 * * *", params=params)
naas.scheduler.add(recurrence="0 9 * * *", debug=True)
You can list all version of a file pushed into the production folder:
naas.scheduler.list()
naas.scheduler.list(path="path/to/my/super/notebook.ipynb")
You can get a version of a file pushed into the production:
naas.scheduler.get()
naas.scheduler.get(path="path/to/my/super/notebook.ipynb")
naas.scheduler.get(histo="20201008101221879662")
naas.scheduler.get(path="path/to/my/super/notebook.ipynb", histo="20201008101221879662")
You can clear the previous version of a file pushed into the production:
naas.scheduler.clear(histo="20201008101221879662")
naas.scheduler.clear(path="path/to/my/super/notebook.ipynb", histo="20201008101221879662")
naas.scheduler.clear()
naas.scheduler.clear(path="path/to/my/super/notebook.ipynb")
You can get the output of the production file:
naas.scheduler.get_output()
naas.scheduler.get_output(path="path/to/my/super/notebook.ipynb")
You can clear the previous output of a file pushed into the production:
naas.scheduler.clear_output()
naas.scheduler.clear_output(path="path/to/my/super/notebook.ipynb")
You can remove any scheduler capability like that, it takes optionally a path:
naas.scheduler.delete()
naas.scheduler.delete(path="path/to/my/super/notebook.ipynb")
naas.scheduler.delete(debug=True)
You don't remember how many Scheduled notebooks you have?
naas.scheduler.currents()
naas.scheduler.currents(raw=True)