Skip to content
The Chat Archive
gpt-3.5-turbo-0613· OpenAI WildChat-4.8M (AI2)

cron job expression for a job on every midnight

  1. User

    cron job expression for a job on every midnight

  2. Assistant

    The cron job expression to schedule a job on every midnight is as follows:

    0 0 * * *
    

    Explanation:

    • The first asterisk (*) denotes the minutes. It is set to zero (0), meaning the job will run at the start of the hour.
    • The second asterisk (*) denotes the hours. It is set to zero (0), meaning the job will run at midnight.
    • The third asterisk (*) denotes the day of the month. It can be any day of the month.
    • The fourth asterisk (*) denotes the month. It can be any month.
    • The fifth asterisk (*) denotes the day of the week. It can be any day of the week.

    Thus, the job will run at 00:00 (midnight) every day.