โฐ Scheduler

Make your notebook run, even when you sleep.

We use CRON tasks to schedule notebooks, find the syntax you need to on: https://crontab.guru/โ€‹

Add

Send in production this notebook and run it, every day at 9:00 :

naas.scheduler.add(recurrence="0 9 * * *")

Other Notebook

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 * * *")

Parameters

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)

Debug

naas.scheduler.add(recurrence="0 9 * * *", debug=True)

List

You can list all version of a file pushed into the production folder:

Current file

naas.scheduler.list()

Other file

naas.scheduler.list(path="path/to/my/super/notebook.ipynb")

Get

You can get a version of a file pushed into the production:

Get the last one

naas.scheduler.get()

With a file path

naas.scheduler.get(path="path/to/my/super/notebook.ipynb")

With history id

naas.scheduler.get(histo="20201008101221879662")

Combined

naas.scheduler.get(path="path/to/my/super/notebook.ipynb", histo="20201008101221879662")

Clear

You can clear the previous version of a file pushed into the production:

One

naas.scheduler.clear(histo="20201008101221879662")

Other Notebook

naas.scheduler.clear(path="path/to/my/super/notebook.ipynb", histo="20201008101221879662")

All

naas.scheduler.clear()

All for filepath

naas.scheduler.clear(path="path/to/my/super/notebook.ipynb")

Get output

You can get the output of the production file:

Get the last one

naas.scheduler.get_output()

With a file path

naas.scheduler.get_output(path="path/to/my/super/notebook.ipynb")

Clear output

You can clear the previous output of a file pushed into the production:

One

naas.scheduler.clear_output()

Other Notebook

naas.scheduler.clear_output(path="path/to/my/super/notebook.ipynb")

Delete

You can remove any scheduler capability like that, it takes optionally a path:

Current

naas.scheduler.delete()

Other file

naas.scheduler.delete(path="path/to/my/super/notebook.ipynb")

Debug

naas.scheduler.delete(debug=True)

List Schedulers

You don't remember how many Scheduled notebooks you have?

Simple

naas.scheduler.currents()

Raw result

naas.scheduler.currents(raw=True)

โ€‹