4
votes
4
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
Awaiting approval

notriv ()

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).

TeRRoR ()

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?

TeRRoR ()

Thanks notriv! This will do it for now, too :)

notriv ()

That would indeed be great. Meanwhile you can use this script https://github.com/ogame-ninja/scripts/blob/master/official/sleep_schedule.go