Filebot not running in crontab after installing with Snapd

Support for Ubuntu and other Desktop Linux distributions
Post Reply
User avatar
Mustang
Posts: 22
Joined: 07 Aug 2017, 15:50

Filebot not running in crontab after installing with Snapd

Post by Mustang »

Hello again Rednoah. I've run into a new problem since updating Filebot with Snapd. I've been running a Filebot script using crontab for several months now with no issues. Everything was running perfectly fine until I installed Filebot with Snapd. (the Snapd install may be coincidental, but it stopped working right after)

Here is my sysinfo:
FileBot 4.7.9 (r4986)
JNA Native: 5.1.0
MediaInfo: 0.7.82
7-Zip-JBinding: 9.20
Chromaprint: 1.2.0
Extended Attributes: OK
Unicode Filesystem: OK
GVFS: PlatformGVFS [/run/user/1000/gvfs]
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: OpenJDK Runtime Environment 1.8.0_121
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 1 GB Max Memory / 44 MB Used Memory
OS: Linux (amd64)
Package: SNAP
uname: Linux GatorServer 4.4.0-93-generic #116-Ubuntu SMP Fri Aug 11 21:17:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Here is my crontab set up. It runs 12 min. after every hour.
## Run Filebot on the Sync folder every hour at 12 min. mark
12 * * * * /home/usr/bin/Filebot_Sync.sh
I checked the crontab logs and verified that crontab is calling my Filebot script.
Sep 14 09:12:01 XXServer CRON[26380]: (usr) CMD (/home/usr/bin/Filebot_Sync.sh)
Sep 14 09:12:01 XXServer CRON[26379]: (CRON) info (No MTA installed, discarding output)
Sep 14 09:17:01 XXServer CRON[26433]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Sep 14 10:12:01 XXServer CRON[26956]: (usr) CMD (/home/usr/bin/Filebot_Sync.sh)
Sep 14 10:12:01 XXServer CRON[26955]: (CRON) info (No MTA installed, discarding output)
Sep 14 10:17:01 XXServer CRON[27001]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Here is my script:

Code: Select all

#!/bin/sh

echo Start renaming and moving TV Shows and Movies

filebot -script fn:amc --output "/media/EXTRAS/Filebot_Sync" --action move --conflict auto -non-strict "/media/EXTRAS/Local_Sync/TV Shows" -non-strict "/media/EXTRAS/Local_Sync/Movies" --log-file /media/EXTRAS/Filebot_Sync/amc_sync.log --def unsorted=y music=y artwork=y excludeList=".sync_excludes" --def @/media/EXTRAS/Filebot_Sync/args.txt

echo Filebot complete with TV Shows and Movies

echo Start renaming and moving Cartoons

filebot -script fn:amc --output "/media/EXTRAS/Filebot_Sync" --action move --conflict auto -non-strict "/media/EXTRAS/Local_Sync/Cartoons" --log-file /media/EXTRAS/Filebot_Sync/amc_sync.log --def unsorted=y music=y artwork=y excludeList=".sync_excludes" --def @/media/EXTRAS/Filebot_Sync/CartoonFormat.txt
There are no errors listed in the Filebot error log. The amc log doesn't show that Filebot was run.

Now, if I run the same script from the terminal (from any directory), it runs perfectly fine.

Do you (or anyone else) have any suggestions as to why the Filebot script is not running?

thanks in advance for your help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot not running in crontab after installing with Snapd

Post by rednoah »

What does the console output say?

Please read Shell Script Debugging for Beginners.
:idea: Please read the FAQ and How to Request Help.
User avatar
Mustang
Posts: 22
Joined: 07 Aug 2017, 15:50

Re: Filebot not running in crontab after installing with Snapd

Post by Mustang »

I forgot to do the CLI debugging. Thanks for reminding me.

Well, crontab is calling the script, but it says filebot is not found. I'm not sure why considering I can run filebot just fine from the command line. And, I can call the script from the command line.

Here's what the console output says when the script is called from crontab:
/home/usr/bin/Filebot_Sync_test.sh: 5: /home/usr/bin/Filebot_Sync_test.sh: filebot: not found
However, when I run the script from the command line I get the following:

Code: Select all

# Environment Variables #
PATH: /snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:/snap/filebot/9/usr/sbin:/snap/filebot/9/usr/bin:/snap/filebot/9/sbin:/snap/filebot/9/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
XMODIFIERS: @im=ibus
GDMSESSION: ubuntu
DBUS_SESSION_BUS_ADDRESS: unix:abstract=/tmp/dbus-cMUeqwRnJz
SNAP_USER_COMMON: /home/usr/snap/filebot/common
DEFAULTS_PATH: /usr/share/gconf/ubuntu.default.path
XDG_CACHE_HOME: /home/usr/snap/filebot/9/.cache
XKB_CONFIG_ROOT: /snap/filebot/9/usr/share/X11/xkb
LD_LIBRARY_PATH: /snap/filebot/9/usr/lib/filebot/amd64:/var/lib/snapd/lib/gl:/var/lib/snapd/void:/snap/filebot/9/usr/lib/x86_64-linux-gnu:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa:/snap/filebot/9/usr/lib/x86_64-linux-gnu/pulseaudio:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa-egl:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa::/snap/filebot/9/lib:/snap/filebot/9/usr/lib:/snap/filebot/9/lib/x86_64-linux-gnu:/snap/filebot/9/usr/lib/x86_64-linux-gnu:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa-egl:/snap/filebot/9/usr/lib/x86_64-linux-gnu/dri:/var/lib/snapd/lib/gl:/snap/filebot/9/usr/lib/x86_64-linux-gnu/libunity:/snap/filebot/9/usr/lib/x86_64-linux-gnu/pulseaudio
UPSTART_SESSION: unix:abstract=/com/ubuntu/upstart-session/1000/1537
SESSION_MANAGER: local/XXXXX:@/tmp/.ICE-unix/1942,unix/XXXXX:/tmp/.ICE-unix/1942
LC_PAPER: en_AU.UTF-8
GST_PLUGIN_SYSTEM_PATH: /snap/filebot/9/usr/lib/x86_64-linux-gnu/gstreamer-1.0
PWD: XXXXXXXXXX
LANGUAGE: en_US:en
WINDOWID: 00000000
LESSOPEN: | /usr/bin/lesspipe %s
INSTANCE: 
UPSTART_INSTANCE: 
GNOME_DESKTOP_SESSION_ID: this-is-deprecated
GTK_MODULES: gail:atk-bridge:unity-gtk-module
CLUTTER_IM_MODULE: xim
LC_ALL: en_US.UTF-8
COMPIZ_BIN_PATH: /usr/bin/
SHLVL: 2
APP_CACHE: /home/usr/snap/filebot/9/cache
GIO_MODULE_DIR: /home/usr/snap/filebot/9/.cache/gio-modules
JAVA_HOME: /snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64
TERM: xterm-256color
XDG_CONFIG_DIRS: /snap/filebot/9/etc/xdg:/snap/filebot/9/usr/xdg:/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg
XDG_SEAT_PATH: /org/freedesktop/DisplayManager/Seat0
XDG_SESSION_ID: c1
GI_TYPELIB_PATH: /snap/filebot/9/usr/lib/girepository-1.0:/snap/filebot/9/usr/lib/x86_64-linux-gnu/girepository-1.0
LC_NAME: en_AU.UTF-8
_: /snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
XDG_GREETER_DATA_DIR: /var/lib/lightdm-data/usr
UPSTART_EVENTS: xsession started
DESKTOP_SESSION: ubuntu
SESSION: ubuntu
FONTCONFIG_FILE: /snap/filebot/9/etc/fonts/fonts.conf
XDG_MENU_PREFIX: gnome-
QT_ACCESSIBILITY: 1
VTE_VERSION: 4205
GST_PLUGIN_SCANNER: /snap/filebot/9/usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner
SNAP_CONTEXT: GW1L7B0XtMh0x1ppW7pH0nBfrtmpfxyrjXnGYmC3kQFt
XAUTHORITY: /home/usr/.Xauthority
LC_MEASUREMENT: en_AU.UTF-8
LC_TELEPHONE: en_AU.UTF-8
XDG_DATA_DIRS: /home/usr/snap/filebot/9/.local/share:/home/usr/snap/filebot/9:/snap/filebot/9/usr/share:/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
MANDATORY_PATH: /usr/share/gconf/ubuntu.mandatory.path
LC_TIME: en_AU.UTF-8
SNAP_COMMON: /var/snap/filebot/common
PAPERSIZE: a4
APP_PREFS: /home/usr/snap/filebot/9/prefs
GTK_IM_MODULE: ibus
SNAP_REVISION: 9
XDG_CURRENT_DESKTOP: Unity
FONTCONFIG_PATH: /snap/filebot/9/etc/fonts/conf.d
QT4_IM_MODULE: xim
QT_LINUX_ACCESSIBILITY_ALWAYS_ON: 1
GST_PLUGIN_PATH: /snap/filebot/9/usr/lib/x86_64-linux-gnu/gstreamer-1.0
LOGNAME: usr
GTK_PATH: /snap/filebot/9/usr/lib/x86_64-linux-gnu/gtk-2.0
JOB: unity-settings-daemon
IM_CONFIG_PHASE: 1
GDK_PIXBUF_MODULE_FILE: /home/usr/snap/filebot/9/.cache/gdk-pixbuf-loaders.cache
SHELL: /bin/bash
LC_ADDRESS: en_AU.UTF-8
GTK2_MODULES: overlay-scrollbar
TMPDIR: /tmp
LIBGL_DRIVERS_PATH: /snap/filebot/9/usr/lib/x86_64-linux-gnu/dri
MIR_CLIENT_PLATFORM_PATH: /snap/filebot/9/usr/lib/x86_64-linux-gnu/mir/client-platform
TEMPDIR: /tmp
XDG_SESSION_PATH: /org/freedesktop/DisplayManager/Session0
SNAP_ARCH: amd64
LOCPATH: :/snap/filebot/9/usr/lib/locale
SESSIONTYPE: gnome-session
XDG_SESSION_DESKTOP: ubuntu
SNAP_LIBRARY_PATH: /var/lib/snapd/lib/gl:/var/lib/snapd/void
LS_COLORS: rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
LC_IDENTIFICATION: en_AU.UTF-8
LESSCLOSE: /usr/bin/lesspipe %s %s
LC_MONETARY: en_AU.UTF-8
SNAP_NAME: filebot
COMPIZ_CONFIG_PROFILE: ubuntu
UPSTART_JOB: unity7
QT_IM_MODULE: ibus
LANG: en_US.UTF-8
GNOME_KEYRING_CONTROL: 
XDG_SESSION_TYPE: x11
SNAP_USER_DATA: /home/usr/snap/filebot/9
DISPLAY: :0
APP_DATA: /home/usr/snap/filebot/9/data
SNAP_REEXEC: 
SNAP_VERSION: 4.7.9
SNAP_LAUNCHER_ARCH_TRIPLET: x86_64-linux-gnu
SNAP_DATA: /var/snap/filebot/9
GDM_LANG: en_US
XDG_DATA_HOME: /home/usr/snap/filebot/9/.local/share
GPG_AGENT_INFO: /home/usr/.gnupg/S.gpg-agent:0:1
SNAP: /snap/filebot/9
USER: usr
LC_NUMERIC: en_AU.UTF-8
XDG_SEAT: seat0
SSH_AUTH_SOCK: /run/user/1000/keyring/ssh
GTK_IM_MODULE_FILE: /home/usr/snap/filebot/9/.cache/immodules/immodules.cache
XLOCALEDIR: /snap/filebot/9/usr/share/X11/locale
GDK_PIXBUF_MODULEDIR: /snap/filebot/9/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders
QT_QPA_PLATFORMTHEME: appmenu-qt5
XDG_RUNTIME_DIR: /run/user/1000/snap.filebot
XDG_VTNR: 7
SNAP_COOKIE: GW1L7B0XtMh0x1ppW7pH0nBfrtmpfxyrjXnGYmC3kQFt
HOME: /home/usr/snap/filebot/9
GNOME_KEYRING_PID: 


# Java System Properties #
java.vendor: Oracle Corporation
swing.aatext: true
sun.java.launcher: SUN_STANDARD
sun.management.compiler: HotSpot 64-Bit Tiered Compilers
os.name: Linux
sun.boot.class.path: /snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/sunrsasign.jar:/snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfr.jar:/snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre/classes
grape.root: /home/usr/snap/filebot/9/data/grape
sun.desktop: gnome
java.vm.specification.vendor: Oracle Corporation
java.runtime.version: 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13
useExtendedFileAttributes: true
user.name: usr
application.update: skip
user.language: en
sun.boot.library.path: /snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64
jna.nosys: true
application.deployment: snap
net.filebot.gio.GVFS: /run/user/1000/gvfs
java.version: 1.8.0_121
user.timezone: 
sun.arch.data.model: 64
java.endorsed.dirs: /snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/endorsed
sun.net.client.defaultConnectTimeout: 10000
sun.cpu.isalist: 
sun.jnu.encoding: UTF-8
file.encoding.pkg: sun.io
unixfs: false
file.separator: /
java.specification.name: Java Platform API Specification
java.class.version: 52.0
user.country: US
jna.boot.library.path: /snap/filebot/9/usr/lib/filebot/amd64
java.home: /snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre
useCreationDate: false
java.vm.info: mixed mode
java.util.prefs.userRoot: /home/usr/snap/filebot/9/prefs/user
os.version: 4.4.0-93-generic
useGVFS: true
path.separator: :
java.vm.version: 25.121-b13
java.awt.printerjob: sun.print.PSPrinterJob
sun.io.unicode.encoding: UnicodeLittle
awt.toolkit: sun.awt.X11.XToolkit
application.dir: /home/usr/snap/filebot/9/data
jna.library.path: /snap/filebot/9/usr/lib/filebot/amd64:/var/lib/snapd/lib/gl:/var/lib/snapd/void:/snap/filebot/9/usr/lib/x86_64-linux-gnu:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa:/snap/filebot/9/usr/lib/x86_64-linux-gnu/pulseaudio:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa-egl:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa::/snap/filebot/9/lib:/snap/filebot/9/usr/lib:/snap/filebot/9/lib/x86_64-linux-gnu:/snap/filebot/9/usr/lib/x86_64-linux-gnu:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa-egl:/snap/filebot/9/usr/lib/x86_64-linux-gnu/dri:/var/lib/snapd/lib/gl:/snap/filebot/9/usr/lib/x86_64-linux-gnu/libunity:/snap/filebot/9/usr/lib/x86_64-linux-gnu/pulseaudio
http.agent: FileBot 4.7.9
user.home: /home/usr/snap/filebot/9
java.specification.vendor: Oracle Corporation
java.library.path: /snap/filebot/9/usr/lib/filebot/amd64:/var/lib/snapd/lib/gl:/var/lib/snapd/void:/snap/filebot/9/usr/lib/x86_64-linux-gnu:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa:/snap/filebot/9/usr/lib/x86_64-linux-gnu/pulseaudio:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa-egl:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa::/snap/filebot/9/lib:/snap/filebot/9/usr/lib:/snap/filebot/9/lib/x86_64-linux-gnu:/snap/filebot/9/usr/lib/x86_64-linux-gnu:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa:/snap/filebot/9/usr/lib/x86_64-linux-gnu/mesa-egl:/snap/filebot/9/usr/lib/x86_64-linux-gnu/dri:/var/lib/snapd/lib/gl:/snap/filebot/9/usr/lib/x86_64-linux-gnu/libunity:/snap/filebot/9/usr/lib/x86_64-linux-gnu/pulseaudio
java.vendor.url: http://java.oracle.com/
java.vm.vendor: Oracle Corporation
java.runtime.name: OpenJDK Runtime Environment
sun.java.command: net.filebot.Main -script fn:sysenv
java.class.path: /snap/filebot/9/usr/lib/filebot/java/ObjCBridge.jar:/snap/filebot/9/usr/lib/filebot/java/ant-commons-net.jar:/snap/filebot/9/usr/lib/filebot/java/ant-javamail.jar:/snap/filebot/9/usr/lib/filebot/java/ant-jsch.jar:/snap/filebot/9/usr/lib/filebot/java/ant-launcher.jar:/snap/filebot/9/usr/lib/filebot/java/ant.jar:/snap/filebot/9/usr/lib/filebot/java/args4j.jar:/snap/filebot/9/usr/lib/filebot/java/commons-io.jar:/snap/filebot/9/usr/lib/filebot/java/commons-logging.jar:/snap/filebot/9/usr/lib/filebot/java/commons-net.jar:/snap/filebot/9/usr/lib/filebot/java/commons-vfs2.jar:/snap/filebot/9/usr/lib/filebot/java/controlsfx.jar:/snap/filebot/9/usr/lib/filebot/java/ehcache.jar:/snap/filebot/9/usr/lib/filebot/java/filebot.jar:/snap/filebot/9/usr/lib/filebot/java/glazedlists_java16.jar:/snap/filebot/9/usr/lib/filebot/java/groovy-all.jar:/snap/filebot/9/usr/lib/filebot/java/guava.jar:/snap/filebot/9/usr/lib/filebot/java/icu4j.jar:/snap/filebot/9/usr/lib/filebot/java/ivy.jar:/snap/filebot/9/usr/lib/filebot/java/jacksum.jar:/snap/filebot/9/usr/lib/filebot/java/jna-platform.jar:/snap/filebot/9/usr/lib/filebot/java/jna.jar:/snap/filebot/9/usr/lib/filebot/java/jsch.jar:/snap/filebot/9/usr/lib/filebot/java/json-io.jar:/snap/filebot/9/usr/lib/filebot/java/jsoup.jar:/snap/filebot/9/usr/lib/filebot/java/junrar.jar:/snap/filebot/9/usr/lib/filebot/java/language-detector.jar:/snap/filebot/9/usr/lib/filebot/java/lanterna.jar:/snap/filebot/9/usr/lib/filebot/java/mail.jar:/snap/filebot/9/usr/lib/filebot/java/metadata-extractor.jar:/snap/filebot/9/usr/lib/filebot/java/miglayout-core.jar:/snap/filebot/9/usr/lib/filebot/java/miglayout-swing.jar:/snap/filebot/9/usr/lib/filebot/java/rsyntaxtextarea.jar:/snap/filebot/9/usr/lib/filebot/java/sevenzipjbinding.jar:/snap/filebot/9/usr/lib/filebot/java/simmetrics.jar:/snap/filebot/9/usr/lib/filebot/java/slf4j-api.jar:/snap/filebot/9/usr/lib/filebot/java/slf4j-jdk14.jar:/snap/filebot/9/usr/lib/filebot/java/streamex.jar:/snap/filebot/9/usr/lib/filebot/java/xmlrpc.jar:/snap/filebot/9/usr/lib/filebot/java/xmpcore.jar:/snap/filebot/9/usr/lib/filebot/java/xz.jar
net.filebot.AcoustID.fpcalc: /snap/filebot/9/usr/bin/fpcalc
java.vm.specification.name: Java Virtual Machine Specification
java.vm.specification.version: 1.8
sun.cpu.endian: little
sun.os.patch.level: unknown
java.util.prefs.systemRoot: /home/usr/snap/filebot/9/prefs/system
java.io.tmpdir: /home/usr/snap/filebot/9/cache/java.io.tmpdir
java.vendor.url.bug: http://bugreport.sun.com/bugreport/
swing.crossplatformlaf: javax.swing.plaf.nimbus.NimbusLookAndFeel
net.filebot.UserFiles.fileChooser: JavaFX
os.arch: amd64
java.awt.graphicsenv: sun.awt.X11GraphicsEnvironment
java.ext.dirs: /snap/filebot/9/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext:/usr/java/packages/lib/ext
user.dir: /home/usr/Documents
awt.useSystemAAFontSettings: on
line.separator: 

java.vm.name: OpenJDK 64-Bit Server VM
java.net.useSystemProxies: true
org.apache.commons.logging.Log: org.apache.commons.logging.impl.NoOpLog
file.encoding: UTF-8
sun.net.client.defaultReadTimeout: 60000
jna.nounpack: true
java.specification.version: 1.8
application.cache: /home/usr/snap/filebot/9/cache/ehcache.disk.store


# Arguments #
args[0] = -script
args[1] = fn:sysenv


Done ヾ(@⌒ー⌒@)ノ
Unfortunately, I am no Linux expert. I have no idea why it will call just fine from the command line and not from crontab. I'm open to suggestions. I'll also start doing some research online.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot not running in crontab after installing with Snapd

Post by rednoah »

Environment variables such as $PATH are different when run via cron. Run which filebot in console, have a look at the folder, and then make sure that that folder is in the $PATH (by adding it yourself) before calling filebot in your script.
:idea: Please read the FAQ and How to Request Help.
User avatar
Mustang
Posts: 22
Joined: 07 Aug 2017, 15:50

Re: Filebot not running in crontab after installing with Snapd

Post by Mustang »

Thanks for your help rednoah. Adding an extra $PATH to the beginning of the script fixed the problem.

Looks like the Snapd installed version of Filebot runs from a completely different folder that crontab doesn't recognise. In fact, I checked $PATH before I made any changes in the script and then added the new $PATH. I checked to make sure it was added and then ran the tests to see if it properly called Filebot. Here is an example of the script I used.

Code: Select all

#!/bin/sh

## check current PATH

echo $PATH > "/home/usr/Documents/showPATH.txt"

## add snap version of filebot PATH

PATH="/snap/bin:$PATH"

## check new PATH

echo $PATH > "/home/usr/Documents/showPATH_new.txt"

## test if script is called

printenv > "/home/usr/Documents/printenvlog.txt"

## check if filebot is called

filebot -script fn:sysenv > "/home/usr/Documents/filebot_test_log.txt" 2>&1

One thing to note, when I ran which filebot it came up with /snap/bin/filebot. If I added /snap/bin/filebot to the $PATH it wouldn't work; however, if I added /snap/bin to the $PATH, it worked fine.

Thanks again for your help. Cheers!
Post Reply