Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for cron expression #142

Merged
merged 9 commits into from
Sep 1, 2022

Conversation

zinen
Copy link
Contributor

@zinen zinen commented Aug 29, 2022

I wanted to define some on and off time for this and are now testing with this code.

Not fully tested yet. But are you interessed?

Added to docker-compose.yml with this PR:

      - SCHEDULE_CRON=                               ## (optional) Scheuler in cron schedule expression 
      ## Example of cron schedule expression:
      #¤ - SCHEDULE_CRON=*/1 12-14 * * 1-5     = allowed to run every 1 minute at hours 12-14 on monday to friday
      ## more help with formatting at https://crontab.guru/#*/1_12-14_*_*_1-5

src/scanner.py Outdated Show resolved Hide resolved
@Der-Henning
Copy link
Owner

Hi @zinen.
Thank you for your effort. This seems to be a useful feature and I will be happy to include it.
Please make sure that it is purely optional and it is possible to update without changing an existing config.
I haven't tested it yet but I will do so in the next days. I will create annotations if I see any issues.

src/models/config.py Outdated Show resolved Hide resolved
@zinen
Copy link
Contributor Author

zinen commented Aug 30, 2022

Please make sure that it is purely optional and it is possible to update without changing an existing config. I haven't tested it yet but I will do so in the next days. I will create annotations if I see any issues.

Agreed. So far i should have input default settings make this setting both optional and so also seemless upgradeble for exsisting users without need to change config.

@zinen
Copy link
Contributor Author

zinen commented Aug 30, 2022

A few changes due to [5cfeb2a] should trigger a new review from you.

Copy link
Owner

@Der-Henning Der-Henning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note these annotations.

src/scanner.py Outdated Show resolved Hide resolved
src/models/config.py Outdated Show resolved Hide resolved
src/scanner.py Outdated Show resolved Hide resolved
src/scanner.py Outdated Show resolved Hide resolved
src/scanner.py Outdated Show resolved Hide resolved
zinen and others added 5 commits August 31, 2022 14:28
Co-authored-by: Henning Merklinger <henning.merklinger@gmail.com>
Co-authored-by: Henning Merklinger <henning.merklinger@gmail.com>
Co-authored-by: Henning Merklinger <henning.merklinger@gmail.com>
@zinen zinen marked this pull request as ready for review August 31, 2022 17:40
@zinen
Copy link
Contributor Author

zinen commented Aug 31, 2022

Marked PR ready for merge

@Der-Henning Der-Henning changed the base branch from main to dev September 1, 2022 07:20
@Der-Henning Der-Henning merged commit 34fe816 into Der-Henning:dev Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants