Synology scheduled tasks

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
abescalamis
Posts: 30
Joined: 26 Jan 2018, 04:10

Synology scheduled tasks

Post by abescalamis »

Hello Rednoah

I finally have the commands that I need, you helped me get there, story short I now know that scheduling a synology task and running a command is different. I get this error, you already know that If I run the task manually it works good.

This is the Error I get

Code: Select all

Error during startup: java.nio.file.AccessDeniedException: /volume1/@appstore/filebot/data/root/cache/0/.lock
java.lang.ExceptionInInitializerError
I read all of the subjects about it, and you pointed out that I would need to use $PATH, I know command line but i'm new to Bash or that type of commands.

The command that I'm trying to run is this

Code: Select all

filebot -rename -r '/volume1/AMC Filebot' --db xattr -non-strict --format "{def m = net.filebot.media.MediaDetection.guessMovieFolder(f); m/m.name}{subt}"
For this other command I have a work around, which is to do the task through Filebot Node

Code: Select all

filebot -script 'fn:amc' '/volume1/AMC Filebot' --output /volume1/Data/Prueba --action move -non-strict --conflict fail --def 'ut_label=movie' 'clean=y' 'deleteAfterExtract=y' 'movieFormat={ny}/{ny}{'\''.'\''+lang.ISO2}' --log-file amc.log --def excludeList=amc.txt
I have a work-around solution but it is a little complicated, I extracted the whole file boot directory and dissect it on my PC to see how Filebot node does it, not the solution I want but will do if is the only way.

I will type the my command on a text editor and will place it in the Task folder inside /usr/local/filebot-node/data/task, I will name it 1pre-amc-subs.arg then I will add the entry pre-amc-subs to the scheduled.ids and last I will add a scheduled task (/usr/local/filebot-node/task pre-amc-subs). (the reason of the 1before the name is for what I read on your task file)

If you point me out or give me an example of the PATH that I could use instead, all of the topics I found no one gives an example.
Last edited by abescalamis on 03 Jun 2018, 06:17, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Synology scheduled tasks

Post by rednoah »

This error tells us that FileBot is crashing on startup when trying to access it's own cache folder:

Code: Select all

Error during startup: java.nio.file.AccessDeniedException: /volume1/@appstore/filebot/data/root/cache/0/.lock
java.lang.ExceptionInInitializerError
Since filebot is successfully started (and then crashes due to permission issues) we know that it's not a $PATH issue.

What user is running filebot? Make sure to NOT select root, and select admin instead. You may also need to delete the /volume1/@appstore/filebot/data folder in case it's already been initialized with root permissions and thus inaccessible by the admin user.
:idea: Please read the FAQ and How to Request Help.
abescalamis
Posts: 30
Joined: 26 Jan 2018, 04:10

Re: Synology scheduled tasks

Post by abescalamis »

OMG, deleting that folder fixed everything.

Thank you very much, you are awesome
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Synology scheduled tasks

Post by rednoah »

Now you know one of the main reasons why you should never run anything as root. ;)
:idea: Please read the FAQ and How to Request Help.
Post Reply