You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
die "No files selected for processing", ExitCode.NOOP
}
Previously it exited with status 0, and now it exits with status 100.
Exiting with a non-zero status code tells my Synology that execution failed and it notifies me about it. If there are no files selected for processing, this doesn't seem like an exceptional situation? At least in my situation of running a scheduled task, it would be much more useful if it continued to exit with a zero status code unless there truly was an error. What are your thoughts?
The text was updated successfully, but these errors were encountered:
4.8.5 has different error codes for different errors. Running the amc script on an input folder where there is nothing to do can be considered an error, or it cannot, depending on the use case and what might be convenient for the end user at the time.
0 indicates a success run, while 100 indicates that nothing happened successfully.
Since your problem is specific to Synology Scheduler, I recommend a solution specific to Synology Scheduler.
Just add this to the end of your scheduled task:
STATUS=$?
# treat ExitCode.NOOP as ExitCode.SUCCESS
if [ $STATUS -eq 100 ]; then
exit 0
fi
exit $STATUS
In 18bcc76 this line was changed:
scripts/amc.groovy
Lines 299 to 302 in a921ac5
Previously it exited with status 0, and now it exits with status 100.
Exiting with a non-zero status code tells my Synology that execution failed and it notifies me about it. If there are no files selected for processing, this doesn't seem like an exceptional situation? At least in my situation of running a scheduled task, it would be much more useful if it continued to exit with a zero status code unless there truly was an error. What are your thoughts?
The text was updated successfully, but these errors were encountered: