-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
[Feature request] Automated Conversion triggered only within specified time range #340
Comments
Although such feature seems to be not implemented, as a workaround, you can take advantage of a pre-conversion hook (docs), that will pause the execution of the conversion as long as a certain condition is met. An example pre-conversion hook could look like this: #!/bin/sh
# ...
current_time="$(date +'%s')"
min_time="$(date -d '14:00' +'%s')"
while [ "$current_time" -lt "$min_time" ]; do
echo "pre-conversion: Conversion is paused until 14:00"
sleep 60
current_time="$(date +'%s')"
done (Make sure your timezone is set correctly within the container.) Of course, you will have to implement your own pause condition logic depending on your needs. |
:OOOOOOO Am I having a Fairy Godmother or something?? |
Idea
Hello,
I would like to suggest to implement a way to specify time slot for automated conversions. I would desire it to be triggered only during night hours when I am not using the server for other activities..
Haven't seen this in documentation so I expect it is not possible at the moment.. Please let me know if it is something you can implement in your image.
Should be possible via CRON. I would like to see multiple CRON slots so it can be combined in a more precise way:
0 0-16 * * MON-FRI
0 2-10 * * SAT-SUN
Having such environment variable:
AUTOMATED_CONVERSION_TIMEFRAME: ['0 0-16 * * MON-FRI', '0 2-10 * * SAT-SUN']
Then implement just
if
check if the current time is within given CRON range.Appreciate, Michal
The text was updated successfully, but these errors were encountered: