I use RealtimeSync to monitor for an external hard drive that, when plugged
in, automatically runs a FFS script. With the new execute on completion
feature, I've added a batch file that checks the log file for errors and
emails me if there has been an error. Just easier than checking each log when
the job is completed, which can lead to me missing things.
I've done a blog about the batch script at my blog here:
http://jamesit.wordpress.com/2012/01/05/email-alerts-for-completion-errors-with-scheduled-freefilesync-jobs/
There may've been an easier way to achieve this, but this is what I came up
with. I hope it's of some use to people here!
Email alerts for syncs completed with errors
- Site Admin
- Posts: 7212
- Joined: 9 Dec 2007
Nice script! It probably can be simplified by evaluating FreeFileSync.exe's
errorlevel, which is < 0 if errors occured (see help file: Batch Scripting).
> I think there’s a bit of a delay before the log file is finished being
created once the bat file is executed.
There is one indeed (in the range of milliseconds), but for no reason. Changed
that for v4.7.
errorlevel, which is < 0 if errors occured (see help file: Batch Scripting).
> I think there’s a bit of a delay before the log file is finished being
created once the bat file is executed.
There is one indeed (in the range of milliseconds), but for no reason. Changed
that for v4.7.
I think I tried getting a script to work before the 'execute on completion'
feature by launching a batch file using RTS. Then that batch file launched FFS
and checked it's errorlevel, but I couldn't get it to work properly. Not sure
where I was going wrong, but at least I've got it working now!
feature by launching a batch file using RTS. Then that batch file launched FFS
and checked it's errorlevel, but I couldn't get it to work properly. Not sure
where I was going wrong, but at least I've got it working now!
- Site Admin
- Posts: 7212
- Joined: 9 Dec 2007
Cool stuff :) Maybe I'll add some support to make it easier to get to the name
of the log file.
of the log file.
- Site Admin
- Posts: 7212
- Joined: 9 Dec 2007
Email notifications are now directly supported with FreeFileSync 10.20!