Starting pxplus in Windows Task Scheduler

Started by Mike Hatfield, February 17, 2019, 03:01:46 AM

Previous topic - Next topic

Mike Hatfield

I have a windows task setup to start a background instance of pxplus.exe
This task starts and runs as expected.

Task Editor:
In the Edit Action I have
Start a program
Program/Script F:\HIT\PVX\pxplus.exe

Add arguments  -BKG "f:\hit\prog\pp\ppemailformbg"

The task runs at startup and ppemailformbg runs OK.

I want to add some pxplus arguments the same as I would with the properties in a WindX shortcut

EG  -BKG "f:\hit\prog\pp\ppemailformbg -arg HI 17"

The whole Action line looks like F:\HIT\PVX\pxplus.exe -BKG "f:\hit\prog\pp\ppemailformbg -arg HI 17"

Now the task fails to start my program
So, the question is - How do I add the startup arguments when using the task scheduler?
This is Windows Server 2016

Mike H

Dave Fullerton

Hi Mike:

I hope you're doing well.

When you say "The task starts to fail", what, do you mean?  Is there an error that occurs?  Does logic you expect to happen because arg(1)="HI" dpesn't happen? 

Just as a thought, are you able to dump the arguments to a text file, which would then be read in "formbg" when it starts up?

Regards

Dave Fullerton

Mike Hatfield

Hi Dave
I can see an instance of pxplus in task manager but my program doesn't run at all.
It's like the windows task parser doesn't like the -arg part of the task or its not passing it to pxplus.
There are no errors in the task manager or event viewer.

Mike H

Dave Fullerton

Hi Mike:

So what happens if you remove the quotes?  Something like

F:\HIT\PVX\pxplus.exe -BKG f:\hit\prog\pp\ppemailformbg -arg HI 17

Dave

Mike Hatfield

Hi Dave,

Removing the quotes worked.
Obvious solution really  :(
Thanks
Mike H

Dave Fullerton

Hi Mike:

Ain't hindsight wonderful ;)

Glad to have helped in a small way.

Dave