Commit 0b471dcd authored by IS1_4M's avatar IS1_4M
Browse files

fixed bug.

parent 418e593f
......@@ -58,7 +58,7 @@ async def make_new_member(member):
return new_member
@tasks.loop(minutes=15)
@tasks.loop(minutes=2)
async def do_scheduled_tasks():
print('started processing tasks')
for guild in client.guilds:
......@@ -78,8 +78,8 @@ async def do_scheduled_tasks():
async def wait_until_multiple_of_15_min():
print('Started before loop of server task scheduling service')
now = datetime.now()
future = datetime(now.year, now.month, now.day, now.hour + (now.minute//15 + 1)==4, ((now.minute//15 + 1) * 15)%60, 0, 0)
print('waiting to start server task scheduling service')
future = datetime(now.year, now.month, now.day, now.hour + ((now.minute//15 + 1)==4), ((now.minute//15 + 1) * 15)%60, 0, 0)
print('waiting to start server task scheduling service (s):',(future - now).seconds , 'or in minutes: ', (future-now).seconds//60)
await sleep((future - now).seconds)
#print('sleeping 10 seconds')
#await sleep(10)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment