# Path: arq/cron.py
# def cron(
#     coroutine: Union[str, WorkerCoroutine],
#     *,
#     name: Optional[str] = None,
#     month: OptionType = None,
#     day: OptionType = None,
#     weekday: WeekdayOptionType = None,
#     hour: OptionType = None,
#     minute: OptionType = None,
#     second: OptionType = 0,
#     microsecond: int = 123_456,
#     run_at_startup: bool = False,
#     unique: bool = True,
#     job_id: Optional[str] = None,
#     timeout: Optional[SecondsTimedelta] = None,
#     keep_result: Optional[float] = 0,
#     keep_result_forever: Optional[bool] = False,
#     max_tries: Optional[int] = 1,
# ) -> CronJob:
#     """
#     Create a cron job, eg. it should be executed at specific times.
# 
#     Workers will enqueue this job at or just after the set times. If ``unique`` is true (the default) the
#     job will only be run once even if multiple workers are running.
# 
#     :param coroutine: coroutine function to run
#     :param name: name of the job, if None, the name of the coroutine is used
#     :param month: month(s) to run the job on, 1 - 12
#     :param day: day(s) to run the job on, 1 - 31
#     :param weekday: week day(s) to run the job on, 0 - 6 or mon - sun
#     :param hour: hour(s) to run the job on, 0 - 23
#     :param minute: minute(s) to run the job on, 0 - 59
#     :param second: second(s) to run the job on, 0 - 59
#     :param microsecond: microsecond(s) to run the job on,
#         defaults to 123456 as the world is busier at the top of a second, 0 - 1e6
#     :param run_at_startup: whether to run as worker starts
#     :param unique: whether the job should only be executed once at each time (useful if you have multiple workers)
#     :param job_id: ID of the job, can be used to enforce job uniqueness, spanning multiple cron schedules
#     :param timeout: job timeout
#     :param keep_result: how long to keep the result for
#     :param keep_result_forever: whether to keep results forever
#     :param max_tries: maximum number of tries for the job
#     """
# 
#     if isinstance(coroutine, str):
#         name = name or 'cron:' + coroutine
#         coroutine_: WorkerCoroutine = import_string(coroutine)
#     else:
#         coroutine_ = coroutine
# 
#     assert asyncio.iscoroutinefunction(coroutine_), f'{coroutine_} is not a coroutine function'
#     timeout = to_seconds(timeout)
#     keep_result = to_seconds(keep_result)
# 
#     return CronJob(
#         name or 'cron:' + coroutine_.__qualname__,
#         coroutine_,
#         month,
#         day,
#         weekday,
#         hour,
#         minute,
#         second,
#         microsecond,
#         run_at_startup,
#         unique,
#         job_id,
#         timeout,
#         keep_result,
#         keep_result_forever,
#         max_tries,
#     )


from arq import cron

async def run_regularly(ctx):
    print('run foo job at 9.12am, 12.12pm and 6.12pm')

class WorkerSettings:
    cron_jobs = [

# Path: arq/cron.py
# def cron(
#     coroutine: Union[str, WorkerCoroutine],
#     *,
#     name: Optional[str] = None,
#     month: OptionType = None,
#     day: OptionType = None,
#     weekday: WeekdayOptionType = None,
#     hour: OptionType = None,
#     minute: OptionType = None,
#     second: OptionType = 0,
#     microsecond: int = 123_456,
#     run_at_startup: bool = False,
#     unique: bool = True,
#     job_id: Optional[str] = None,
#     timeout: Optional[SecondsTimedelta] = None,
#     keep_result: Optional[float] = 0,
#     keep_result_forever: Optional[bool] = False,
#     max_tries: Optional[int] = 1,
# ) -> CronJob:
#     """
#     Create a cron job, eg. it should be executed at specific times.
# 
#     Workers will enqueue this job at or just after the set times. If ``unique`` is true (the default) the
#     job will only be run once even if multiple workers are running.
# 
#     :param coroutine: coroutine function to run
#     :param name: name of the job, if None, the name of the coroutine is used
#     :param month: month(s) to run the job on, 1 - 12
#     :param day: day(s) to run the job on, 1 - 31
#     :param weekday: week day(s) to run the job on, 0 - 6 or mon - sun
#     :param hour: hour(s) to run the job on, 0 - 23
#     :param minute: minute(s) to run the job on, 0 - 59
#     :param second: second(s) to run the job on, 0 - 59
#     :param microsecond: microsecond(s) to run the job on,
#         defaults to 123456 as the world is busier at the top of a second, 0 - 1e6
#     :param run_at_startup: whether to run as worker starts
#     :param unique: whether the job should only be executed once at each time (useful if you have multiple workers)
#     :param job_id: ID of the job, can be used to enforce job uniqueness, spanning multiple cron schedules
#     :param timeout: job timeout
#     :param keep_result: how long to keep the result for
#     :param keep_result_forever: whether to keep results forever
#     :param max_tries: maximum number of tries for the job
#     """
# 
#     if isinstance(coroutine, str):
#         name = name or 'cron:' + coroutine
#         coroutine_: WorkerCoroutine = import_string(coroutine)
#     else:
#         coroutine_ = coroutine
# 
#     assert asyncio.iscoroutinefunction(coroutine_), f'{coroutine_} is not a coroutine function'
#     timeout = to_seconds(timeout)
#     keep_result = to_seconds(keep_result)
# 
#     return CronJob(
#         name or 'cron:' + coroutine_.__qualname__,
#         coroutine_,
#         month,
#         day,
#         weekday,
#         hour,
#         minute,
#         second,
#         microsecond,
#         run_at_startup,
#         unique,
#         job_id,
#         timeout,
#         keep_result,
#         keep_result_forever,
#         max_tries,
#     )


# Path: docs/examples/cron.py
from arq import cron


async def run_regularly(ctx):
    print('run foo job at 9.12am, 12.12pm and 6.12pm')

class WorkerSettings:
    cron_jobs = [

        cron(run_regularly, hour={9, 12, 18}, minute=12)