12
votes
5
comments
|
Dynamic "sleeping times"
Suggested by:
TeRRoR
()
It would be great to have a "sleeping bot" manager, where you could configure sleeping times for every time, which can be additional be used with "random" time before / after the setting.
Eg.: Monday - 11:20pm - 4:50am" +/- 30 minutes Tuesday - 10:45pm - 6:30am" +/- 45 minutes etc.. One setting for each day (especially being so exactly with the time) is a bit too inaccurate. Cheers
Done
|
and done :-)
Just change line 11. So if you want a random value between 1am and 2am, set the cron for 1am, and put a random sleep of 1h (line 11).
Hi notriv - do you know if its possible to make the cronjob times also dynamically? So that instead of:
CronExec("0 0 23 * * 0", newSleepCallback(fiveHours))
doing something like:
CronExec("0 0 RANDOMVALUE * * 0", newSleepCallback(fiveHours)) - would this work somehow by escaping the variable?
Thanks notriv! This will do it for now, too :)
That would indeed be great.
Meanwhile you can use this script https://github.com/ogame-ninja/scripts/blob/master/official/sleep_schedule.go