[GH-ISSUE #106] Backup task ignore cron #87

Closed
opened 2026-02-26 21:34:22 +03:00 by kerem · 2 comments
Owner

Originally created by @pharmarin on GitHub (Mar 6, 2025).
Original GitHub issue: https://github.com/eduardolat/pgbackweb/issues/106

I have to backup tasks with monthly (0 23 * */1 *) and daily (0 23 * * *) cron.

I expected that the monthly task would execute every month and the daily task would execute every day. But both execute every day.

What I am missing ?

Originally created by @pharmarin on GitHub (Mar 6, 2025). Original GitHub issue: https://github.com/eduardolat/pgbackweb/issues/106 I have to backup tasks with monthly (0 23 * */1 *) and daily (0 23 * * *) cron. I expected that the monthly task would execute every month and the daily task would execute every day. But both execute every day. What I am missing ?
kerem closed this issue 2026-02-26 21:34:22 +03:00
Author
Owner

@julien-wff commented on GitHub (Mar 7, 2025):

Hi!

The problem here is that in your monthly cron, you are not choosing the day of the month (the third *). To run on the first day of each month, make it like so: 0 23 1 * *.

Also, having a step of 1 (*/1) is useless in crons, it's the same as just writing *. Your two crons were basically the same.

Tip: you can use a site like Crontab Guru to preview your cron (click on next under the text interpretation to see the next 5 dates)

<!-- gh-comment-id:2707514193 --> @julien-wff commented on GitHub (Mar 7, 2025): Hi! The problem here is that in your monthly cron, you are not choosing the day of the month (the third `*`). To run on the first day of each month, make it like so: [0 23 1 * *](https://crontab.guru/#0_23_1_*_*). Also, having a step of 1 (`*/1`) is useless in crons, it's the same as just writing `*`. Your two crons were basically the same. Tip: you can use a site like [Crontab Guru](https://crontab.guru) to preview your cron (click on <ins>next</ins> under the text interpretation to see the next 5 dates)
Author
Owner

@pharmarin commented on GitHub (Mar 8, 2025):

Well I’m sorry to bother you for that.

<!-- gh-comment-id:2708057668 --> @pharmarin commented on GitHub (Mar 8, 2025): Well I’m sorry to bother you for that.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pgbackweb#87
No description provided.