| 1234567891011121314151617181920212223242526272829303132333435 |
- # This Python file uses the following encoding: utf-8
- # @author runhey
- # github https://github.com/runhey
- from time import sleep
- from datetime import datetime, time
- from random import randint
- from module.config.config import Config
- class Task:
- def __init__(self,
- task_name: str, # 任务名称,必须是大写的
- next_run: datetime,
- limit_time: time,
- target_run: datetime = None,
- team_task: bool = False,
- role: str = 'leader',
- limit_count: int = 0,
- ):
- self.task_name = task_name
- self.next_run = next_run
- self.target_run = target_run
- self.limit_time = limit_time
- self.team_task = team_task
- self.role = role
- self.limit_count = limit_count
|