AutoStart when new file in folder with Synology
AutoStart when new file in folder with Synology
Hello,
I would lile to know how to make filebot fully automatic on my DS218+
Actually i need to go to my DSM, open filebot, clic on "execute" when a new file is available in my "completed" folder.
I can create a task with "schedule" but it's not logic and can wait many hours.
I have found many topics about it but nothing works for me or it's too complicated for my low coding skills.
What i would like to do with your help ?
When a new file is added on my "completed" folder, autoStart Filebot. (it look easy)
Huge thanks for your future help.
I would lile to know how to make filebot fully automatic on my DS218+
Actually i need to go to my DSM, open filebot, clic on "execute" when a new file is available in my "completed" folder.
I can create a task with "schedule" but it's not logic and can wait many hours.
I have found many topics about it but nothing works for me or it's too complicated for my low coding skills.
What i would like to do with your help ?
When a new file is added on my "completed" folder, autoStart Filebot. (it look easy)
Huge thanks for your future help.
Re: AutoStart when new file in folder with Synology
A.
You can create a Schedule Task and then schedule that task to run every 10 minutes. That's the low-code easy solution.
A slight improvement (at the cost of basic coding) would be running light-weight find first to check if there are new files and only run heavy-weigth filebot when there actually are new files. See Run filebot command only if there are new files for details.
B.
How do I monitor a folder and call filebot on newly added files? › docker on all platforms on Linux will get you started with actually monitoring a folder for new files. Some docker and command-line expertise would be beneficial here though.
You can create a Schedule Task and then schedule that task to run every 10 minutes. That's the low-code easy solution.

B.
How do I monitor a folder and call filebot on newly added files? › docker on all platforms on Linux will get you started with actually monitoring a folder for new files. Some docker and command-line expertise would be beneficial here though.
Re: AutoStart when new file in folder with Synology
Hello rednoah,
Thank you for the answer.
Start a task every 10min make me crazy, files are added 3 times / week, is it useful to stress my DS218+ for this ?
Does Docker need less resources to watch a folder ?
Many thanks
Thank you for the answer.
Start a task every 10min make me crazy, files are added 3 times / week, is it useful to stress my DS218+ for this ?
Does Docker need less resources to watch a folder ?
Many thanks
Re: AutoStart when new file in folder with Synology
Yep. That's why I am suggesting to Run filebot command only if there are new files. Check every 10 min / 60 min / 360 min / etc until you find the desired trade-off between responsiveness and resource usage.
You'll want to run your own tests. Do keep in mind that "monitoring a folder for new files" does require something to do something at all times. The process that is mostly not doing anything will still use memory at the very least. If you use the find command once an hour to check for new files then I can guarantee that it won't use any CPU or memory most of the time as nothing is running most of the time. That said, run tests and report back.

Re: AutoStart when new file in folder with Synology
Thank you.
I'm sorry but i don't understand where to add the scripts from viewtopic.php?t=13550
I have tried to add it in Schudler but my skills are limited, can you explain for a lvl0 ? Many thanks
I'm sorry but i don't understand where to add the scripts from viewtopic.php?t=13550
I have tried to add it in Schudler but my skills are limited, can you explain for a lvl0 ? Many thanks
Re: AutoStart when new file in folder with Synology
Your scheduled task currently uses this code:
Paste this code instead:
The 0 in filebot-node-task 0 may be a different number in your scheduled task.
/volume1/complete is the file path to to where you add files. You will have to change this to a file path that makes sense for your setup.
-mmin -60 assumes that your scheduled task is set to run once per hour. If you use a different interval then you must modify the -mmin value accordingly, otherwise the "new files" check may not always work as expected.
Shell: Select all
filebot-node-task 0
Shell: Select all
if find /volume1/complete -type f -size +100M -mmin -60 -print -quit | read
then
filebot-node-task 0
fi



Re: AutoStart when new file in folder with Synology
Thank you for the answer.
I have applied the modifications in the schedule task but nothing happened, I have forced the execution but still nothing happened too.
Any ideas?
The script :

I have applied the modifications in the schedule task but nothing happened, I have forced the execution but still nothing happened too.
Any ideas?
The script :
Shell: Select all
if find /volume1/downloads/torrentengine/completed -type f -size +100M -mmin -60 -print -quit | read
then
filebot-node-task 3
fi

Re: AutoStart when new file in folder with Synology



Shell: Select all
find /volume1/downloads/torrentengine/completed -type f -size +100M -mmin -60 -print
Re: AutoStart when new file in folder with Synology
I used Filebot to move and rename ({Plex}) for Emby.
I know it's not working because nothing is added to Emby.
I don't see any output.
Sorry if it's not very clear and my English too.
I know it's not working because nothing is added to Emby.
I don't see any output.
Sorry if it's not very clear and my English too.
Re: AutoStart when new file in folder with Synology
État actuel : 1 (Interrompu)
Sortie/erreur standard :
find: `/volume1/downloads/torrentengine/completed': No such file or directory
Sortie/erreur standard :
find: `/volume1/downloads/torrentengine/completed': No such file or directory
Re: AutoStart when new file in folder with Synology
No such file or directory means that the file path /volume1/downloads/torrentengine/completed does not exist.
You can do this to find all the large files and see the file paths:

Shell: Select all
find /volume1 -type f -size +100M
Re: AutoStart when new file in folder with Synology
Great job, the script find all files in the right folder "completed". The path wasn't correct but it's fixed now.
Can you tell me what I need to add now ?
"then
filebot-node-task 3
fi" ?
Actual script:
find /volume/TorrentEngine/downloads/completed/ -type f -size +100M
Many thanks
Can you tell me what I need to add now ?
"then
filebot-node-task 3
fi" ?
Actual script:
find /volume/TorrentEngine/downloads/completed/ -type f -size +100M
Many thanks
Re: AutoStart when new file in folder with Synology
Seem to be perfect with this script :
if find /volume1/TorrentEngine/downloads/completed/ -type f -size +100M |
read
then
filebot-node-task 4
fi
Answer:
Parameter: excludeLink = y
Parameter: artwork = y
Parameter: clean = y
Parameter: deleteAfterExtract = y
Parameter: minLengthMS = 0
Parameter: emby = *****
Parameter: seriesFormat = {plex}
Parameter: animeFormat = {plex}
Parameter: movieFormat = {plex}
Parameter: musicFormat = {plex}
Parameter: excludeList = .excludes
Argument[0]: /volume1/TorrentEngine/downloads/completed
Use excludes: /volume1/VideoClub/.excludes (28)
No files selected for processing
Done ¯\_(ツ)_/¯
if find /volume1/TorrentEngine/downloads/completed/ -type f -size +100M |
read
then
filebot-node-task 4
fi
Answer:
Parameter: excludeLink = y
Parameter: artwork = y
Parameter: clean = y
Parameter: deleteAfterExtract = y
Parameter: minLengthMS = 0
Parameter: emby = *****
Parameter: seriesFormat = {plex}
Parameter: animeFormat = {plex}
Parameter: movieFormat = {plex}
Parameter: musicFormat = {plex}
Parameter: excludeList = .excludes
Argument[0]: /volume1/TorrentEngine/downloads/completed
Use excludes: /volume1/VideoClub/.excludes (28)
No files selected for processing
Done ¯\_(ツ)_/¯
Re: AutoStart when new file in folder with Synology
I suppose the folder need to be empty to perfectly working?
Thanks
Thanks
Re: AutoStart when new file in folder with Synology
e.g.
The -mmin -60 bit is the whole point of the exercise. Check if there's a recently modified file, within the last 60 minutes, and then call filebot if so. Run this task every 60 minutes. Every 60 minutes we find that there is no file modified in the last 60 minutes, and thus skip the filebot call.
Shell: Select all
if find /volume1/TorrentEngine/downloads/completed -type f -size +100M -mmin -60 -print -quit | read
then
filebot-node-task 4
fi
Re: AutoStart when new file in folder with Synology
Dear Rednoah,
I would like to thank you, it working well.
Many thanks
I would like to thank you, it working well.
Many thanks