[BUG] Run Schedule cron option missing "5" in hours #65

Closed
opened 2025-10-09 16:57:24 -05:00 by giteasync · 4 comments
Owner

Originally created by @cybrnook on GitHub.

Before submitting a bug report, I have:

  • Reviewed the documentation.
  • Ensured I am using ghcr.io/cleanuparr/cleanuparr docker repository.
  • Ensured I am using the latest version.
  • Enabled verbose logging.

What is the behavior?

In setting up the "Basic" scheduler, I noticed that the "Hours" option goes 1,2,3,4,6, skipping 5.

At the same time, if I may make a suggestion, it would also be nice to have the minute and second range go from 1-59, and have the hours go from 1-24.

Again, thanks for the great work in the updated direction you are headed.

Image

Which operating system do you use?

Unraid

What type of deployment do you use?

Docker container

Relevant log output


Anything else?

No response

Originally created by @cybrnook on GitHub. ### Before submitting a bug report, I have: - [ ] Reviewed the documentation. - [x] Ensured I am using ghcr.io/cleanuparr/cleanuparr docker repository. - [x] Ensured I am using the latest version. - [ ] Enabled verbose logging. ### What is the behavior? In setting up the "Basic" scheduler, I noticed that the "Hours" option goes 1,2,3,4,6, skipping 5. At the same time, if I may make a suggestion, it would also be nice to have the minute and second range go from 1-59, and have the hours go from 1-24. Again, thanks for the great work in the updated direction you are headed. ![Image](https://github.com/user-attachments/assets/5c9b8925-0b28-440b-aafa-214f149e7a4f) ### Which operating system do you use? Unraid ### What type of deployment do you use? Docker container ### Relevant log output ```shell ``` ### Anything else? _No response_
giteasync added the
bug
label 2025-10-09 16:57:24 -05:00
Author
Owner

@Flaminel commented on GitHub:

The same goes for the other schedule types (minute and second). Also there is no need to run the queue cleaner or the download cleaner more often than 30 seconds. The content blocker is allowed as low as 5 seconds because it needs to prevent files from being downloaded. Even if 1 second was an option, I guarantee it will not run every 1 second because it will not finish the work in that time span.

@Flaminel commented on GitHub: The same goes for the other schedule types (minute and second). Also there is no need to run the queue cleaner or the download cleaner more often than 30 seconds. The content blocker is allowed as low as 5 seconds because it needs to prevent files from being downloaded. Even if 1 second was an option, I guarantee it will not run every 1 second because it will not finish the work in that time span.
Author
Owner

@cybrnook commented on GitHub:

Hmm, in peeking at the code, seems this is by design: fb6ccfd011/code/backend/Cleanuparr.Infrastructure/Utilities/ScheduleOptions.cs (L23)

@cybrnook commented on GitHub: Hmm, in peeking at the code, seems this is by design: https://github.com/Cleanuparr/Cleanuparr/blob/fb6ccfd011e7ae7f2ec2a6c0a32578d0cbb54465/code/backend/Cleanuparr.Infrastructure/Utilities/ScheduleOptions.cs#L23
Author
Owner

@Flaminel commented on GitHub:

Yes, it is by design. All available values render predictable behavior.
A cron expression for every 6 hours will run at: 12am, 6am, 12pm, 6pm and again at 12am next day.
A cron expression for every 5 hours will run at: 12am, 5am, 10am, 3pm, 8pm and again at 12am next day.

Notice the 4 hour gap between 8pm and 12am. This is due to how cron expressions work and that is why advanced configuration is an option. The user should opt-in for this (imho) weird behavior by using a custom cron expression.

@Flaminel commented on GitHub: Yes, it is by design. All available values render predictable behavior. A cron expression for every 6 hours will run at: 12am, 6am, 12pm, 6pm and again at 12am next day. A cron expression for every 5 hours will run at: 12am, 5am, 10am, 3pm, 8pm and again at 12am next day. Notice the 4 hour gap between 8pm and 12am. This is due to how cron expressions work and that is why advanced configuration is an option. The user should opt-in for this (imho) weird behavior by using a custom cron expression.
Author
Owner

@cybrnook commented on GitHub:

Makes sense.

@cybrnook commented on GitHub: Makes sense.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Cleanuparr-Cleanuparr#65
No description provided.