How can I make sheduler task

How can I make sheduler task not in hooks?
In doctype I can choose periodicity and task, after enter values this task begins work

You can add scheduler hooks

thanks for your answer)
I think that hooks you can changing only once, do not it? But I need many times.

What do you mean “many times”

@NMyshuk see this code, you can link your function in scheduler_events, so your function/event will be called hourly, daily or weekly as per your requirement

1 Like

I have new doctype, where I can select periodicity(“all”,'hourly",etc) and function.
Then I save this doctype and this periodicity and function will be added in scheduler events.
One time this function will be called with event “all”, other time with “hourly” and etc.

thanks for your answer.
But one time I want call my function with event “all”, other time with event “hourly” without changing every time

Call it from “Hourly” event, and write login in your code where it should be executed only once a day.