Issues Scheduling FreeFileSync on Linux Mint

Get help for specific problems
Posts: 18
Joined: 9 Dec 2021

parkernathan

I'm trying to schedule FreeFileSync on a computer (2011 iMac) running Linux Mint (Uma Cinnamon).

GNOME Scheduler seems to be no longer supported.

I have Zeit installed so I can edit my crontab.

I need to set FreeFileFync to sync every day at 6:00 PM Local Time.

The path to my FreeFileSync batch file is at: /home/parkernathan/FreeFileSync/WebMate.ffs_batch

I've tried different commands, with no luck. I also looked over this, but not sure what to do with some of it:

viewtopic.php?t=6385

Does anyone know what I need to do to successfully get FreeFileSync syncing on a schedule on Linux Mint? This is one of my remaining outstanding issues causing me to fully migrate over to my Linux machine. I can manually run FreeFileSync each day, although it's been a bit of a pain.

Thanks!
Posts: 345
Joined: 7 Jan 2018

bgstack15

Would you please share a screenshot of your zeit entry for the periodic task, or perhaps share the text loaded into the various fields?

In general, a crontab entry should resemble the following, either with or without the username (the first appearance of parkernathan) depending on which exact cron file is used.
0 18 * * *  parkernathan  DISPLAY=:0 /home/parkernathan/FreeFileSync /home/parkernathan/FreeFileSync/WebMate.ffs_batch
You cannot rely on cron to correctly parse a $HOME or $PATH for that matter. And I don't know Zeit, so I don't know if it will provide a $DISPLAY value that would suffice.
Posts: 18
Joined: 9 Dec 2021

parkernathan

I just edited my Zeit window to your command recommendations. Attached is my screenshot. I'll reboot tonight and test it tomorrow to see if it fires off the command, or if I still have issues. I'll report back.

If this doesn't work and I need to try manually editing crontab, I can.

Thanks!
Attachments
2021-12-09_20-55.png
2021-12-09_20-55.png (52.46 KiB) Viewed 3117 times
2021-12-09_20-56.png
2021-12-09_20-56.png (52.95 KiB) Viewed 3117 times
Posts: 345
Joined: 7 Jan 2018

bgstack15

It appears Zeit controls the user crontab (i.e., the crontab -l when run by your user). You should just remove the "parkernathan" from the beginning of your Zeit entry.
Posts: 18
Joined: 9 Dec 2021

parkernathan

I just edited that, and I'll report back tomorrow to see how it goes. Thanks!
Posts: 18
Joined: 9 Dec 2021

parkernathan

Still not syncing. If I need to ditch Zeit and edit crontab directly, just let me know what to do, and I'll do it. Thanks!
Posts: 345
Joined: 7 Jan 2018

bgstack15

Well, you could choose to redirect standard output and standard error to files, to see what messages occur. That would look like:
DISPLAY=:0 /home/parkernathan/FreeFileSync/FreeFileSync_x86_64 /home/parkernathan/FreeFileSync/WebMate.ffs_batch 1>>/home/parkernathan/standardoutput.log 2>>/home/parkernathan/standarderror.log
Note how I changed what binary is called as well. I see in your screenshot (which is slightly outdated based on the conversation that followed) that you are running "/home/parkernathan/FreeFileSync" which you then also use as a directory name in the path to the batch file. You should make sure you run whatever the FreeFileSync binary is, and not the directory name.
Posts: 18
Joined: 9 Dec 2021

parkernathan

I see what's wrong now.

My batch file is at: /home/parkernathan/FreeFileSync/WebMate.ffs_batch

That's not where my executable of FreeFileSync is installed.

How do I check where my copy of FreeFileSync is installed?

Thanks!
Posts: 345
Joined: 7 Jan 2018

bgstack15

Go ahead and run FreeFileSync however you run it. When it is running, open a terminal and run the following command:
ps -eu ${USER} -o pid,command:180 | grep -iE "[f]reefilesync"
Paste that whole statement into a terminal, after validating that it won't run anything dangerous! You should always be careful when pasting commands from a forum into a terminal. Here, we are running the processes that your user owns, and then searching for FreeFileSync case-insensitively.
When you see the pid number, e.g., 196582, you can then run:
ls -al /proc/196582/exe
You can combine all of these above commands into a one-liner.
$ ls -ald /proc/$( ps -eu ${USER} -o pid,command:180 | grep -iE '[f]reefilesync' | awk '{print $1}' )/exe
lrwxrwxrwx. 1 bgstack15 bgstack15 0 Dec 13 08:54 /proc/580725/exe -> /usr/bin/FreeFileSync
So my FreeFileSync binary is /usr/bin/FreeFileSync.

The official release from Zenju uses filename FreeFileSync.x86_64, if I recall correctly.
Posts: 18
Joined: 9 Dec 2021

parkernathan

Thanks for the followup.

I ran:
ps -eu ${USER} -o pid,command:180 | grep -iE "[f]reefilesync"
And got back:
10744 /opt/FreeFileSync/FreeFileSync
10748 /opt/FreeFileSync/Bin/FreeFileSync_x86_64
Do I need to go ahead and run the second command, or does this give you back what you need?

Thanks!
Posts: 345
Joined: 7 Jan 2018

bgstack15

Oh, sorry, that shows you the path to the FreeFileSync binary. And it's kind of weird to have two separate binaries running, but it'll be fine to use the x86_64 one as the command for your cron entry.
DISPLAY=:0 /opt/FreeFileSync/Bin/FreeFileSync_x86_64 /home/parkernathan/FreeFileSync/WebMate.ffs_batch 1>/dev/null 2>&1
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

Oh, sorry, that shows you the path to the FreeFileSync binary. And it's kind of weird to have two separate binaries running, but it'll be fine to use the x86_64 one as the command for your cron entry. bgstack15, 14 Dec 2021, 03:32
The "official" binary is "FreeFileSync", not "Bin/FreeFileSync_x86_64", which is internal, thous in the subdirectory "Bin". Plain "FreeFileSync" is the launcher and should be used, which then redirects to one of the binaries located in "Bin", and also does additonal checks and tests that help troubleshoting various issues on Linux (e.g. if GTK2 libs are missing).
Posts: 18
Joined: 9 Dec 2021

parkernathan

Using:
DISPLAY=:0 /opt/FreeFileSync/FreeFileSync
/home/parkernathan/FreeFileSync/WebMate.ffs_batch 1>/dev/null 2>&1
Is not syncing anything.

Should I try?
DISPLAY=:0 /opt/FreeFileSync/Bin/FreeFileSync_x86_64 /home/parkernathan/FreeFileSync/WebMate.ffs_batch 1>/dev/null 2>&1
Or
DISPLAY=:0 /opt/FreeFileSync/Bin/FreeFileSync /home/parkernathan/FreeFileSync/WebMate.ffs_batch 1>/dev/null 2>&1
Thanks!
Posts: 345
Joined: 7 Jan 2018

bgstack15

Hm, that really should have worked. Change the redirection commands (1>/dev/null 2>&1) to this:
1>>~/ffs.log 2>&1
And then when the cron entries are triggered again, the log files should go to file ~/ffs.log (that's /home/parkernathan/ffs.log) and we can read that output and see what's going on.
Posts: 18
Joined: 9 Dec 2021

parkernathan

Here's the log and the output of it:
/bin/sh: 1: /opt/FreeFileSync/FreeFileSync4: not found
I can launch FreeFileSync from the Mint Menu and get to a FreeFileSync GUI.

Thanks!
Attachments
ffs.log
(55 Bytes) Downloaded 231 times
Posts: 345
Joined: 7 Jan 2018

bgstack15

Obviously there's a typo in the command! Just remove the character "4" from the end of the binary name.
If Zeit doesn't show an erroneous "4" in there, we can inspect the cron entry ourselves. As your user, in a terminal, run:
crontab -l
That's L as in Lima. That will list the contents of your user's cron table ("crontab"). If you still don't see a "4" but it still throws that error, we have some really weird problem going on.
Posts: 18
Joined: 9 Dec 2021

parkernathan

Looks like this worked! The log came out clear today, and it did successfully sync my files. Should I go ahead and change the output back to: 1>/dev/null 2>&1 so it's not generating a log every day?

Thanks!
Posts: 345
Joined: 7 Jan 2018

bgstack15

Yes, now you should change it back.
Posts: 18
Joined: 9 Dec 2021

parkernathan

Done. Thanks again for resolving this for me! This was a major frustration that has been alleviated.
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju