Skip to content
This repository was archived by the owner on Mar 22, 2024. It is now read-only.

Commit ec1961c

Browse files
authored
Merge pull request #1 from voltron4lyfe/run_and_quit
Add option to disable scheduling.
2 parents 9aee4a3 + f417d7f commit ec1961c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

config.sample.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# The rest of the options are script specific
55
global:
66
run_now: true # If true it will run the script immediately, if false it will wait until the schedule_hour
7-
schedule_hour: 4 # This is the hour of the day you want the script to run, it's based on a 24 hour clock and defaults to 4am
7+
schedule_hour: 4 # This is the hour of the day you want the script to run, it's based on a 24 hour clock and defaults to 4am. Set to -1 to disable scheduling and quit after running.
88
log_level: info # log_level can be: debug, info, warning, error, critical
99
radarr:
1010
# name is the name of the radarr instance, this is used to reference the instance in other scripts

main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ async def main():
4040
# Run tasks immediately (if run_now is True)
4141
await run_tasks(config.run_now)
4242

43+
if int(config.schedule_hour == -1):
44+
logger.debug("scheduling disabled. exit")
45+
return
46+
4347
while True:
4448
# Get the current time
4549
now = datetime.now()

0 commit comments

Comments
 (0)