Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import asyncio
- import os
- from datetime import datetime
- import time
- from apscheduler.schedulers.asyncio import AsyncIOScheduler
- async def bla():
- date_bitch = str(input('Введи время: '))
- text_bitch = str(input('Введи текст: '))
- print(date_bitch)
- print(text_bitch)
- time_now = str(time.strftime("%Y-%m-%d ", time.localtime()))
- time_now += date_bitch
- print(time_now)
- scheduler.add_job(check, 'date', run_date=time_now, args = [text_bitch])
- async def check(*args):
- print('Poshlo Poehalo')
- for x in range(10):
- time = str(time.strftime("%M:%S", time.localtime()))
- print(f'#{x} |Чек. Текст: {text_bitch}, время сейчас: {time}.')
- if __name__ == '__main__':
- scheduler = AsyncIOScheduler()
- #scheduler.add_job(tick, 'cron', day='*' , hour='*' , minute='*' , second='*/1')
- scheduler.start()
- print('Go go go Ctrl+{0} to exit'.format('Break' if os.name == 'nt' else 'C'))
- try:
- print('1')
- asyncio.get_event_loop().run_forever()
- except (KeyboardInterrupt, SystemExit):
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement