#1 2025-11-08 16:48

CoolRaoul
Member
Registered: 2025-11-08
Posts: 6

Shutdown tasks fail

Here's my first profile:

condition:
1) User Inactive: Active after inactivity for 0:10:00 using Last Input Event

Actions:
1) Run Program:  c:\bin\psshutdown.exe -k -t 60 -c
2) Shutdown: Not forced

Note : there are two different kind of "shutdown" actions because of my tests. Anyway, none worked

"shutdown" actions fails with "error"
"run program" action fails with "failed to execute

Offline

#2 2025-11-09 09:45

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

Re: Shutdown tasks fail

The most common reason why the Shutdown action fails is because some application or a service blocks it, preventing the shutdown operation.

Have you tried using the Shutdown action with the Force option enabled?

Essentially, don't allow the running applications/services to prevent a shutdown.

Offline

#3 2025-11-09 10:05

CoolRaoul
Member
Registered: 2025-11-08
Posts: 6

Re: Shutdown tasks fail

den4b wrote:

Have you tried using the Shutdown action with the Force option enabled?

I'm going to test this right now and keep you informed.
But what about "Run Program" action which fails too ?

Offline

#4 2025-11-09 10:41

CoolRaoul
Member
Registered: 2025-11-08
Posts: 6

Re: Shutdown tasks fail

CoolRaoul wrote:
den4b wrote:

Have you tried using the Shutdown action with the Force option enabled?

I'm going to test this right now and keep you informed.

I thing i'm going to give up: now it won't even trigger, even when the delay has passed.
UxFbZMM.png

Here the actions are triggered only after having moved the mouse, the status "inactive for ..." keeps counting as long as I don't move the mouse or touch the keyboard whatever actions I put in the list.

Offline

#5 2025-11-09 18:05

CoolRaoul
Member
Registered: 2025-11-08
Posts: 6

Re: Shutdown tasks fail

I thought i had managed to make it work using that sequence:

  • conditions

    • User Inactive: Inactive for 0:00:20 using Last Input Event

  • actions

    • Play Sound: "CP70 Med B3.wav"

    • Run Program: shutdown /s

unfortunately, on my desktop W11 machine, the shutdown command (either built-in or windows native "shutdown") is not executed as long as the session is locked.
My objective is to have the computer shutdown by itself in any case of inactivity even when user is away (but still logged in).

Offline

#6 2025-11-09 18:58

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

Re: Shutdown tasks fail

There are several issues with your configuration.

1. You must enable the Force option in the Shutdown action, if you want to shutdown the machine while the session is locked.

shutter-force-shutdown-option.png

2. The User Inactive event will keep running past the specified time if you have the "Trigger when user becomes active" option enabled. You probably don't want that option enabled.

3. Avoid using PsShutdown tool unless you really know what you are doing. In your screenshot, the set of options "-r -k -c" is invalid. Execute the same command manually in the Command Prompt to test it. Also, if you enable the "Wait until execution finishes" option in the Run Program action, it will display an "Error" status when the tool returns a non-zero exit code, i.e. an issue with the program.

Offline

#7 2025-11-09 19:05

CoolRaoul
Member
Registered: 2025-11-08
Posts: 6

Re: Shutdown tasks fail

den4b wrote:

1. You must enable the Force option in the Shutdown action, if you want to shutdown the machine while the session is locked.

Already tried without success but I'm going to check again then.

2. The User Inactive event will keep running past the specified time if you have the "Trigger when user becomes active" option enabled. You probably don't want that option enabled.

that was my previous mistake, but I've fixed it now.

3. Avoid using PsShutdown tool unless you really know what you are doing. In your screenshot, the set of options "-r -k -c" is invalid. Execute the same command manually in the Command Prompt to test it. Also, if you enable the "Wait until execution finishes" option in the Run Program action, it will display an "Error" status when the tool returns a non-zero exit code, i.e. an issue with the program.

The main issue is that PsShutdown  requires administrative privileges and that Shutter runs the command in normal mode. That's why I've now switched to native windows "shutdown" command as you should have noticed in my last post "Run Program: shutdown /s"

Offline

#8 2025-11-09 19:18

CoolRaoul
Member
Registered: 2025-11-08
Posts: 6

Re: Shutdown tasks fail

CoolRaoul wrote:

Already tried without success but I'm going to check again then.

It was probably another issue when I checked that at first with "Force" since when using that option it is now working fine with (even if I don't like preventing apps to make a graceful shutdown but that's another story)

Last edited by CoolRaoul (Yesterday 10:59)

Offline

Board footer

Powered by FluxBB