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: How to trigger 'task scheduler' on new wifi connection?

22 Sep 2012   #1
Dnomyar220

Windows 7 Ultimate x64
 
 
How to trigger 'task scheduler' on new wifi connection?

Hey everyone,

Searched everywhere, and really striking out on how to do this (if it's even possible). I'd like to use Task Scheduler (or some other program) to automatically perform a task when my Android phone connects to my home wifi network (my PC is plugged into this router). Is there a way to use my Linksys router to trigger an event on my PC, that I can use to perform an action? Really just need it to do basic things, like start playing music on my computer by opening Spotify. Not sure if this is possible...

Thanks in advance for the advice!


My System SpecsSystem Spec
.
22 Sep 2012   #2
UsernameIssues

W7 Pro SP1 64bit
 
 

Welcome to the Seven Forums.

One way to do this is to:
...have the Linksys router always assign the same IP address to your phone
...write/run a script* on your Windows computer that pings that IP
...once the IP responds then the phone is connected to that network
...the script can then launch or do whatever you can code it to do


*use s scripting tool like AutoIt or AutoHotkey
My System SpecsSystem Spec
22 Sep 2012   #3
Dnomyar220

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by UsernameIssues View Post
Welcome to the Seven Forums.

One way to do this is to:
...have the Linksys router always assign the same IP address to your phone
...write/run a script* on your Windows computer that pings that IP
...once the IP responds then the phone is connected to that network
...the script can then launch or do whatever you can code it to do


*use s scripting tool like AutoIt or AutoHotkey
Thanks for the quick response. Looks like this task may be a little advanced for me (hardly any script writing experience...). I might have to keep searching for now.
My System SpecsSystem Spec
.

22 Sep 2012   #4
UsernameIssues

W7 Pro SP1 64bit
 
 

Can you set your router to assign the same IP address to the phone?
This is usually done via the mac address.

Here is some AutoIt code that you can modify:
Code:
AutoItSetOption ("TrayIconDebug", 1)

While 1
    If Ping("192.168.0.10", 10000) Then _Do_this()
    Sleep(1000)
WEnd

Func _Do_this()
    Run("notepad")
    While 1
        If Not Ping("192.168.0.1", 10000) Then Return
        Sleep(10000)
    WEnd
EndFunc
The first While/Wend loop waits for the phone to appear on the network.
Once the phone shows up - the code goes to the function named _Do_this
For this test code - I just have it open notepad.
The next While/Wend loop waits for the phone to leave the network.
Once the phone leaves - the code starts all over again at the first loop.

Watch the second video in this post...
SysTray Icons of some programs don't re-appear after Explorer restart
...and read the info about AutoIt.

Give it a try - post back if you cannot get it to work.
My System SpecsSystem Spec
Reply

 How to trigger 'task scheduler' on new wifi connection?




Thread Tools






Similar help and support threads
Thread Forum
Task Scheduler recognizes only first trigger
Hi, the problem is if I create a new task for the task scheduler which is having multiple triggers, only the first entered trigger is recogized and used. E.g., I have two weekly triggers to execute a program. The first selects Mon, Tue, Wed, Thu, and Fri to run the program. The second...
Performance & Maintenance
Task scheduler: trigger on screensaver event possible?
I got task scheduler to run a sync utility when the (on idle) trigger occurs. However, it would trigger while I am watching a full screen movie or video and exit out. Is there anyway to fix this? If not, I noticed my screen saver doesn't get initialize while watching a movie or video in full...
Performance & Maintenance
Task scheduler unable to load task status/active tasks at startup.
My task manager is unable to load task status/active tasks at startup. I get the message: "The selected task "{0}" no longer exists. To see the current tasks, click Refresh." When I refresh I get the same message. I checked and found that under Microsoft the problem was in the defrag...
Performance & Maintenance
Scheduler/trigger events
Hello, I am on Windows 7 enterprise. I use a script to backup my external harddrive to a NAS. (\\NAShome\openshare) (in the script i use "robocopy) I want to use the scheduler to run the script WHEN I POWER ON THE NAS.. This should be possible with trigger-event. I just can't figure out which...
General Discussion
Help with using idle trigger in Win Task Scheduler
OK I know i've bombarded the forums lately with a couple threads all somewhat related. Point of this thread -- how to correctly set the idle trigger in windows task scheduler. There is a MSFT article Task Idle Conditions (Windows) which tries to explain it, but I can't figure it out. I...
Performance & Maintenance
Task Scheduler Trigger @ Program shutdown
Hello, I would like a particular Task to run each time the Firefox application is closed, or, perhaps easier, each time my computer shutdowns. But I have no idea how to set up such Trigger. Have any of you an idea on how I should proceed? Thanks for the help.
Performance & Maintenance


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 10:28.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App