@jphughan depends how much effort you put into your script, powershell can generate a "backup skipped" email in such circumstances, I don't really see much point to this exercise though, or the advantage of that notification over one for a failed job.
Bearing in mind I actually agree with
@jphughan this is pointless & would rather have failed jobs logged personally, the only time I see
any advantage is if you want the postpone option to pop up, & want to not see it unless you're at the correct location.
Editing a generated batch job along the lines:
REM Determine if connected to the network
NETSH WLAN SHOW INTERFACE | FINDSTR /r SSID | FINDSTR /r NetworkName
IF %ERRORLEVEL% == 0 (
SET "ConnectedToNetwork=True"
) ELSE (
SET "ConnectedToNetwork=False"
)
REM Run tasks that require a connection to a NAS on a specific network
IF %ConnectedToNetwork% == True (
[Macrium job here]
)
Tweaking the above to suit
ought to get the job done, only calling Macrium if you're on the "right" network. Again I suppose you could trigger some other outcome to alert you in the case also of ==False
So if you really want this you can, but I'd rather not see such a function as an included feature owing to the pitfalls
@jphughan pointed out.
Skipping backup jobs silently is dangerous, as is only notifying on warnings or failures, people assume no news is good news, when circumstances can arise where actually the notification mechanism failed & backups are also failing silently. You want to be notified of all outcomes in all cases, success, warnings, failures, and skipped jobs.