Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Task scheduler to detect time zone change or set to run when app run

02 Nov 2015   #1
Louiscar

Windows 7 ultimate 64bit
 
 
Task scheduler to detect time zone change or set to run when app run

Hi,

I want to know if it's possible to get the task scheduler to run when an app runs. So far I haven't found a way to do it.

Although I'd like to know how to do this anyway the pressing concern is that one of my apps is changing the time zone everytime I run it.

I have a powershell script which checks that my time zone is correct and if not resets it. But the trigger is the problem. I don't know how to get the trigger to recognise this change and would like some advise as to how I can detect the change (what event am I looking for?)

Alternatively as mentioned above how can I detect the application running and change it. The event 'application' doesn't seem to do it and has only a select bunch of choices non of which seem appropriate.

Maybe what I am trying to do is not possible?


My System SpecsSystem Spec
.
02 Nov 2015   #2
Ztruker

Windows 10 Pro X64
 
 

By app, do you mean program or app like in Win 8 or 10?

If program, why not look for another that doesn't change the time zone, or maybe there is an option or parameter for the program that can help?

Alternatively you could launch the app via a batch file and as soon as it launched then launch your powershell script. Set the script to loop until the app terminates then fix the time zone and exit.
My System SpecsSystem Spec
03 Nov 2015   #3
Louiscar

Windows 7 ultimate 64bit
 
 

Sorry I meant program not app.

Thanks for the suggestions. I like the batch file idea although I'm a little wary of the script looping taking up resources. Not really that adept with powershell but I'll figure it out.
My System SpecsSystem Spec
.

03 Nov 2015   #4
UsernameIssues

W7 Pro SP1 64bit
 
 

You only need a loop if the program changes the Time Zone over and over while it runs.

If your program only changes the Time Zone once, then your batch file could look like:

program
timeout 10
powershell script
My System SpecsSystem Spec
03 Nov 2015   #5
Louiscar

Windows 7 ultimate 64bit
 
 

It does so it needs a way to detect when the program terminates then set it back.
Is there a way to get that info when it stops running?
My System SpecsSystem Spec
03 Nov 2015   #6
torchwood

W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
 
 
task scheduler

Has the program, (it would be handy to know what it is), created its own task.
You can check via
Controlpanel>admintools>taskScheduler>taskscheduler library,
this lists all non MS tasks.
If its there highlight it and delete.

Alternately create a basic task to run the Windows time service after the program has started.
Same route as above.

Roy


Attached Thumbnails
Task scheduler to detect time zone change or set to run when app run-task-sched.png  
My System SpecsSystem Spec
03 Nov 2015   #7
Ztruker

Windows 10 Pro X64
 
 

I'm sure Powershell has a way to query a task. How often it has to wake up to query the task then reset the time depends on your usage of the program.

What program by the way?
My System SpecsSystem Spec
06 Nov 2015   #8
Louiscar

Windows 7 ultimate 64bit
 
 

The program is Metal Gear. I have no idea why it does this.
My System SpecsSystem Spec
06 Nov 2015   #9
Ztruker

Windows 10 Pro X64
 
 

Nothing returned on a search for metal gear changes data on system
My System SpecsSystem Spec
Reply

 Task scheduler to detect time zone change or set to run when app run




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
How do I display the current time in the Task Scheduler?
I'd like the Task Scheduler to display the current time when a task begins. Something like: "This task is beginning at {CURRENT_TIME}" "This task has completed at {CURRENT_TIME}" Thanks, Burt
General Discussion
task scheduler worked one time Shutdown
I have Windows 7 ultimate installed. I used the Task scheduler one time to do a Shutdown of it set at 10pm it worked fine one night now when i set it for a different day it does not work anymore. i have the right trigger, time and date etc set correctly WTH. :mad:
General Discussion
How to change time zone in Seven Forums control panel?
How to change time zone in Seven Forums control panel? I live in Trinidad (it's in the Caribbean). I set my time zone to (UTC -4:00) Atlantic Time (Canada) but I can't seem to change the timezone in the sevenForums control panel.
Chillout Room
Time Zone - Change
How to Change the Time Zone in Windows 7 This will show you how to change the Time Zone and turn Daylight Saving Time on or off in Windows 7. Here's How: 1. Right click on the clock, at the far right of the taskbar, and click on Adjust Date/Time. (See screenshot below)
Tutorials
Task Scheduler error 2147944309 when I change task from
I have a simple task (cmd batch file). Whenever I try to change the settings I get a dialog box that reads as follows:"An error has occurred for task RemoteBk. Error message: The following error was reported: 2147944309". My computer is part of a domain.
Installation & Setup


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 05:11.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App