Is there a way to schedule windows 10 connection to internet

1

1

I need my computer be reconnected to internet after some hours from now for example, while I disconnect it manually, how should I set it to connect to the same wifi network after some hours ?

I downloaded the task scheduler but did not find anything like that on the software to set:

Here is the scheduler I use:

enter image description here

what is the negative vote for ?????

Farzad64

Posted 2016-01-28T10:26:23.073

Reputation: 163

1You don't need to download Task Scheduler - it's built in to Windows as "Scheduled Tasks". You can simply write a script to disable the wireless adapter on one schedule, and then another one to enable it... apart from downloading this unnecessary program, what have you tried so far that you're stuck with? – Kinnectus – 2016-01-28T10:29:53.483

I did not know that I should write a script and just have to try to see how it works – Farzad64 – 2016-01-28T10:38:22.910

1@Farzad64 It's pretty easy to create the script. See my answer. – DavidPostill – 2016-01-28T10:46:18.297

Answers

2

How do I connect to the same WiFI network after some hours?

  1. Use netsh wlan connect name=wifi_profile_name in a batch file.

    Replace wifi_profile_name with the name of the profile to be used

  2. Schedule a task using the built-in task scheduler taskschd.msc to run the batch file at the time you want to connect:

    • Click "Start"

    • Type Task and then click "Task Scheduler"

    • Click "Create Basic Task".

    • A wizard will start that walks you through the process, prompting you with what program you want to execute, as well as how often and what time it should be run.

  3. You can also use schtasks to create the task from the command line as an alternative to using the Task Scheduler.


netsh wlan connect usage

netsh wlan connect /?

Usage: connect [name=] [[ssid=]] [[interface=]]

Parameters:

Tag             Value
ssid          - SSID of the wireless network.
name          - Name of the profile to be used in connection attempt.
interface     - Name of the interface from which connection is attempted.

Remarks:

Connect to the wireless network given by ssid using the specified profile. Connection is attempted from the specified interface unless there is only one available interface on the system, in which case, the interface parameter can be omitted.

Parameter profile name is required but ssid is optional. If only one SSID exists in the profile, then this SSID is used to connect. If there are multiple SSIDs in the profile, then parameter ssid is required.

Parameter interface is required if there are two or more available interfaces on the system. When interface is specified, it cannot be a wildcard name.

If the specified interface is already connected to a wireless network, this command will first disconnect from the currently connected network, then attempt to connect to the new network. However, if these two networks are the same this command simply returns success and does nothing.

Examples:

connect name=Profile1 ssid=SSID1
connect name=Profile2 ssid=SSID2 interface="Wireless Network Connection"

Further Reading

DavidPostill

Posted 2016-01-28T10:26:23.073

Reputation: 118 938

1

@Farzad64 Do you need more help? If this was helpful to you and answered your question, please don't forget to upvote/accept it. See accept an answer.

– DavidPostill – 2016-01-28T15:42:11.173

Dear David, definitely I'd like to accept it, only that now I need to go home from the office and try it, I also have more questions that will ask, I think I should first try and see how it works, best regards – Farzad64 – 2016-01-28T15:44:00.400

1@Farzad64 No problem. – DavidPostill – 2016-01-28T15:44:59.427

I accepted but couldn't Upvote – Farzad64 – 2016-01-28T15:45:05.610