Most popular:
How to set Brave profile name and picture?
For a long time I've been using Chrome (earlier on I used Opera ), mainly because of laziness (i.e. its fantastic synchronization featu...
GMail: Invalid server certificate (The certificate cannot be used for this purpose).
For a couple of days now every now and then I cannot load messages from GMail accounts. Other people report that other things also may not w...
My first KLWP preset.
I feel excited about KLWP since I've realized that it is highly probable that I could replace several standalone apps - by using this s...
search this blog
..traces left on one August 7, 2019 00:54
Smart backup: improved schedule.
update (...at some nice day of September 15 :) (15:40)):
,,,on how to launch an app automatically in a non-disturbing manner (i.e. without a need to close its window each and every time).
Although I set My "global" (PC) backup to be performed every 50 minutes and, on the other hand, My computer is up usually all the time - a 24h/7 backup is not necessarily an optimal choice, mainly because 1) it could be a waste of resources since there is no need to backup anything during My absence at the desk - and 2) as You may remember I've set sound notifications both on backup initiation and finish - I don't want to hear those notifications while I'm sleeping :) .
Keeping all of that in mind I found Myself in the need of setting up a smart backup schedule - i.e. the one which could be intelligently flexible, with the ability to adjust to any circumstances at the present moment. You might ask Why I didn't choose a fixed timespan for My backup mechanism to work? - the answer is that I don't have a regular, predictable hours to point out (sometimes I turn in earlier, another times I work until the wee small hours of the morning). So the only choice it seems to be a solution which could detect that I'm not at the computer for long enough - and then deactivate the backup. Besides, it should activate it again when I'm back again. Easier said than done ;) .
How to schedule an action based on the idle time?
Initially I tried to write a script within AutoHotkey. Finally I've managed to prepare one, based on this solution. which was able to detect a long-enough idle time and kill the desired process (GoodSync.exe) - but I couldn't figure out how to restore it when the idle time is over. I was thinking on detecting a mouse move or a keyboard activity - but it seems not to make sense because it should work only in connection to the idle time - not covering all the rest mouse/keyboard activity instances. So I've found Myself into confusion.
My current ray of hope is the Watch 4 Idle tool by LeeLu Soft - a small freeware program with which You can ascribe actions both to the desired idle time and leaving it.
Sounds brilliant! :) So... the last thing I needed was a simple AutoHotkey script to kill the backup process, being converted into an .exe file (in order to be reachable by Watch 4 Idle - just right click an .ahk file with Your script and choose Compile Script). The action for leaving the idle time was much simpler: just run the GoodSync again (from the Program Files).
update:
A good idea to keep in mind: the app which has been launched automatically - naturally - shows its window on the desktop (let alone the icon on the taskbar). As a result You might want to close this window every time it appears.
Fortunately, sometimes it is possible to avoid this occurrence by forcing the app to be launched directly within Windows tray (so no window on the desktop, neither a taskbar icon). To do so, first You need to find out if the app supports so-called "run parameters" (or "arguments"). In case of GoodSync in its manual I've found this:
"/min or /tray
Run minimized, only taskbar icon is visible"
So I was able to write My AutoHotkey script (to launch GoodSync after idle) the following way:
Run "C:\Program Files\Siber Systems\GoodSync\GoodSync.exe" /tray
return
The last thing to do was to convert this script into an executable form (right click on its icon and choose Compile Script), which to I could point out within Watch 4 Idle.
Currently I'm testing if this solution really works. For a short period of time (5 sec.) it does - but with the desired value (3300 sec.) it hasn't worked last night (I've read the GoodSync's logs :) ). So... I'm still taking a closer look on this (see the results). But in theory it seems to be a perfect solution, and of top of that You can use a portable app which You even don't need to install :) . Moreover, the developer of Watch 4 Idle designed more neat and useful (freeware) tools which are very interesting to become acquainted with - highly recommended :) .
No comments:
Post a Comment