Category Archives: Synology NAS

Scheduling tasks for Synology NAS for Wake On Lan

In order to keep alive a server, that doesn’t come back on following a power cut, I have created a WOL task that is running on my Synology NAS. The first thing is that you need to define a script for running on the NAS, then configure the NAS to actually run this script.¬†For the script, in this case the WOL task is the key thing; but you also need to start the correct sh

#!/bin/sh
ether-wake [mac address]

One of the key things is that it must be a unix file, and therefore if you edit under vi you should NOT see ^M at the end of the line

Next, is to schedule this, and this needs to include the full path for the NAS, in line with the unix path, eg, would need for example to include /volume1/  Finally, in the scheduler itself you need to call the script with a shell prefix in order to run it correct; see below

2015-10-06_10-59-46

Setting everything up like this will result in your shell script running, and in my case, the server waking up if it doesn’t recover after a powercut