Skip to main content

NightWatchman Enterprise 7.3

Configuring NightWatchman scheduled actions from the command-line

You can set different power down times on different days of the week using different power down and log-off actions. The previously used switches: shutdowndays, shutdowntime, shutdownaction and logoffaction are still supported but we recommend moving to the new enhanced syntax at your earliest convenience.

The following examples illustrate scheduledactions in practice. Note the slight differences between in syntax for Windows computers and Mac. The command-lines are broken down to separate rows for clarity – they are executed as single line.

Event

Command-line

Power off a machine with a logoffaction of force everyday at 18:00

Windows:

NightWatchman.exe 
–scheduledactions="ALLDAYS(18:00,PowerOff,Force)"

Mac:

sudo ./NightWatchman 
–scheduledactions ALLDAYS=18:00,PowerOff,Force

Power off a machine with a logoffaction of force on weekdays at 18:00 and a passive log-off and hibernate at 1300 during the weekends

Windows:

NightWatchman.exe 
–scheduledactions="WEEKDAYS(18:00,PowerOff,Force) |
WEEKEND(13:00,Hibernate,Passive)"

Mac:

sudo ./NightWatchman 
–scheduledactions WEEKDAYS=18:00,PowerOff,Force 
WEEKEND=13:00,Hibernate,Passive

Power off a machine with a logoffaction of force on Mondays and Tuesdays, passive log-off and standby at 20:00 on Wednesdays and an active hibernate at 17:00 on Thursday and Fridays

Windows:

NightWatchman.exe 
–scheduledactions="MON,TUE(18:00,PowerOff,Force)| 
WED(20:00,Standby,Passive)| 
THU,FRI(17:00,Hibernate, Active)"

Mac:

sudo ./NightWatchman 
–scheduledactions MON,TUE=18:00,PowerOff,Force 
WED=20:00,Standby,Passive THU,FRI=17:00,Hibernate,Active

Clear all daily power off events

Windows:

NightWatchman.exe –scheduledactions="OFF"

Mac:

sudo ./NightWatchman –scheduledactions