Personal computing discussed

Moderators: Flying Fox, Ryu Connor

Captain Ned
Gold subscriber
Global Moderator
Topic Author
Posts: 27465
Joined: Wed Jan 16, 2002 7:00 pm
Location: Vermont, USA

Task Scheduler question

Tue Oct 16, 2018 2:56 pm

I've got a task that runs once/day to upload settings for a certain program to a FTP server, and this task runs just fine. Is there a way in Task Scheduler (Win 8.1) to tie the scheduled job to the actual program so that the settings upload doesn't take place if the program isn't running? Google isn't finding what I want and nothing in the Properties tabs of the scheduled job seem to fit either.
Humans sleep soundly in their beds because rough cats stand ready in the night to visit violence on those who would do us harm.
Maximum Gerbil
Posts: 4262
Joined: Sat Nov 25, 2006 3:21 pm
Location: Kansas

Re: Task Scheduler question

Tue Oct 16, 2018 3:19 pm

So, this is a bit convoluted but I think I found a way...gimme a bit to type it up. (also I'm on W10 so I hope it translates)

my way was getting...stupid. Have you tried NSSM?
i7 6700K - Z170 - 16GiB DDR4 - GTX 1080 - 512GB SSD - 256GB SSD - 500GB SSD - 3TB HDD- 27" IPS G-sync - Win10 Pro x64 - Ubuntu/Mint x64 :: 2015 13" rMBP Sierra :: Canon EOS 80D/Sony RX100
Flying Fox
Gerbil God
Posts: 25462
Joined: Mon May 24, 2004 2:19 am

Re: Task Scheduler question

Wed Oct 17, 2018 1:16 am

Your upload is probably is coded in a script I suppose? I would say the simplest is to add code around it to check for the process running. Off the top of my head, you can probably use PowerShell or even good old tasklist command + output string parsing to check for your target process running before starting the upload.
The Model M is not for the faint of heart. You either like them or hate them.

Gerbils unite! Fold for UnitedGerbilNation, team 2630.

Who is online

Users browsing this forum: No registered users and 1 guest