How to monitor rclone sync with windows task scheduler?

I am using rclone sync with windows task scheduler. What are the ways to get notified when sync was unsuccessful. I know about but I don't know a way for it to work with task scheduler.

What approach do others take ?


there are a numnber of ways.
--- can check the exit code, if non-zero, then there was an error.
--- my backup scripts always sends an email when done.
the body of the email is short summary of rclone debug log. also, fastcopy, 7zip, restic
the attachement of the email is the full debug log, but redacted for id/secrets/etc.

froim the docs, can use a simple command such as
# Sends an HTTP GET request with curl: curl -m 10 --retry 5

have you searched the forum?
[This image provides a feature that allows me to set up a URL to receive notifications for successful and failed copies.](Max-duration option is triggering exit with error)

this is a very simple, working example, .cmd script

this command will error out as the folder does not exit.
note: the exit-code from rclone is 3
note: i set the user-agent, as a convenience, to be displayed at their website

%rcmd% lsd c:\doesnotexit
	echo Failed with exit-code = %errorlevel%
	curl --user-agent "DisplayThisText" --retry 3

here is the output from the command line.
notice that the exit-code = 3

rclone lsd c:\doesnotexit 
ERROR : : error listing: directory not found
Failed to lsd with 2 errors: last error was: directory not found
Failed with exit-code = 3
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     2  100     2    0     0      5      0 --:--:-- --:--:-- --:--:--     5

and from website.
notice that the status = 3, same as the exit-code from rclone

How do you run it silently ?

I was running the rclone sync command directly from task scheduler, guess I'll use a script to check error code.

yes, can use my working example.

yes, that is the way to [quote="SidMan, post:4, topic:44533, full:true"]
How do you run it silently ?
much discussed in the forum...
there a number of ways, often i use nircmd, from nirsoft, perhaps the best set of free tool for windows.

for example,

start "rclone" rclone copy ....
waitfor /t 1 whatever
nircmd win hide title "rclone"
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.