#1 2016-02-28 12:50

lucartl
Member
Registered: 2016-02-27
Posts: 2

Start a program and then shutdown after 3 hours

Hi there. Testing your very nice and useful program, but I can't make this configuration work on a win10 installation.

[General]
Logic=3

[Event1]
ID=OnTime
Config=TIME=00:30:00;DATE=2016-02-27;USEDATE=False;

[Event2]
ID=Countdown
Config=TIME=03:30:00;

[Action1]
ID=RunProgram
Config=COMMAND="C:\Users\Luca\AppData\Local\Microsoft\OneDrive\OneDrive.exe" ;WAIT=False;

[Action2]
ID=Shutdown
Config=FORCE=True;

Basically what I'm trying to achieve, is OneDrive to start to upload in the cloud, at internet off peak hours, and shut down the PC after an uploading of 3 hours. I can make OneDrive start no problem, as long there is no other event after the on time that triggers OneDrive start action. I can make the Pc shutdown no problem. But together, no way. I did have tried different suitable logic setting, but no difference.

Can you help me?

Many Thanks

Offline

#2 2016-02-29 11:07

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Start a program and then shutdown after 3 hours

You may have misinterpreted the relation between events and actions. Shutter monitors a set of events, waits until they get triggered, then it executes all actions one by one.

What you are trying to achieve requires two separate schedules:

  1. Wait until 00:30:00, then execute OneDrive.exe.

  2. Wait until 03:30:00, then Shutdown computer.

You can achieve this with Shutter by defining these as two separate presets, and starting a new instance of Shutter with the 2nd preset at the end of the 1st preset. Does this make sense?


Preset 1: "Start OneDrive and shutdown later":

[General]
Logic=0

[Event1]
ID=OnTime
Config=TIME=0:30:00;DATE=2016-02-29;USEDATE=False;

[Action1]
ID=RunProgram
Config=COMMAND=C:\Users\Luca\AppData\Local\Microsoft\OneDrive\OneDrive.exe;WAIT=False;

[Action2]
ID=RunProgram
Config=COMMAND=Shutter.exe /preset "Shutdown at 3.30am";WAIT=False;

[Action3]
ID=Utilities
Config=ACTION=1;PAUSESECONDS=10;

Preset 2: "Shutdown at 3.30am":

[General]
Logic=0

[Event1]
ID=OnTime
Config=TIME=3:30:00;DATE=2016-02-29;USEDATE=False;

[Action1]
ID=Shutdown
Config=FORCE=True;

P.S. Make sure you disable the option to allow only single instance of Shutter.

Offline

#3 2016-02-29 16:55

lucartl
Member
Registered: 2016-02-27
Posts: 2

Re: Start a program and then shutdown after 3 hours

Ok Thanks. So that is the way Shutter works. I would like to understand more, for future reference, but I don't want bother you too much, and you gave me already a solutions anyway. My idea was that event 1 triggered action 1 an so on. Are you thinking to implement a timer within the Shutdown action?

Offline

#4 2016-02-29 23:30

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Start a program and then shutdown after 3 hours

lucartl wrote:

Are you thinking to implement a timer within the Shutdown action?

There is no need. You can simply add a "Message" action with any desired delay before the "Shutdown" action.

Offline

#5 2016-03-01 10:04

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Start a program and then shutdown after 3 hours

Note, a "Run Preset" action was added in Shutter 3.7.5 Beta.

You can now use this action to start a different preset in the same instance of Shutter. This should be more convenient than using "Run Program" to start Shutter with a different preset.

Offline

Board footer

Powered by FluxBB