Skip to the content

Cron Expression for Every Sunday

0 0 * * 0 runs a job every Sunday at 00:00, the same as @weekly. In a crontab, Sunday can be written as 0 and as 7.

At 00:00 on Sunday

FieldValueMatches
Minute00
Hour00
Day of month*every day of the month
Month*every month
Day of week0Sunday

Next 10 runs

    Cron goes by the clock of the machine it runs on. These are the runs on a machine in your time zone.

    Share this tool:TwitterFacebookLinkedInWhatsAppEmail

    The weekly job

    0 0 * * 0 runs at 00:00 on Sunday, which is the night from Saturday to Sunday. The shortcut @weekly stands for exactly this expression.

    ExpressionRuns
    0 0 * * 0At 00:00 on Sunday
    @weeklyAt 00:00 on Sunday
    0 0 * * 7At 00:00 on Sunday
    0 0 * * SUNAt 00:00 on Sunday
    0 4 * * 0At 04:00 on Sunday
    0 0 * * 6,0At 00:00 on Saturday and Sunday

    Zero or seven

    A crontab accepts both 0 and 7 for Sunday, and SUN as well. The first three rows of the table all give the schedule of this page. A range that ends on Sunday is best written with 7 or with names: 5-7 and FRI-SUN are Friday to Sunday.

    Quartz numbers the days differently. There 1 is Sunday and 7 is Saturday, so a number copied from one system to the other is a day off. Names work in both.

    The night the clocks change

    In Europe and North America the clocks go forward and back early on a Sunday morning, at some point between 01:00 and 04:00 depending on the country. A weekly job in those hours meets that twice a year: once the time doesn't exist, and once it comes round twice. Midnight is safe there, and so is anything from 04:00 on, such as 0 4 * * 0.

    The cron expression explainer has the full syntax: the five fields, lists, ranges and steps, and how day of month and day of week work together.

    See all 12