[Future Request] Sleep schedule using timer instead time
because there is different timezone, I think it will be safe to use a timer instead time for sleep schedule.
before
{
"type": "SleepSchedule",
"config": {
"enabled": false,
"time": "22:54",
"duration":"7:46",
"time_random_offset": "00:24",
"duration_random_offset": "00:43"
}
}
after
{
"type": "SleepSchedule",
"config": {
"time": "01:59:00", //in hour, minute and second (example is 1 hour and 59 minutes)
"duration":"00:10:00", //duration sleep in hour, minute and second (example us 10 minutes)
"time_random_offset": "00:00:24", // add timer random 24 second
"duration_random_offset": "00:00:43" // add duration random 43 second
}
}
Start time depends on you system, where bot is running. So timezone doesn't matter. And where is the difference, can't see it?
If you mean having a configuration where I can setup my bot to work for 3 hours and sleep for one and start again, I really would like that!
@danielsdian you can already do this with multiple SleepSchedule tasks. In your case it would be 6 tasks.
I guess I could do multiple timers
but how do you stop it from setting its time 24 hrs later , the current code will only really work for someone that never turns the bot off
in all my tests if the bot can not perform a full duration cycle before the scheduled sleep time it will make the next scheduled sleep the following day
@fari-99 does #4066 meet this request?