I have Ubuntu 14.04 LTS installed on my laptop, I am using 3G USB modem to connect to the internet (sometimes I do not have direct access to this laptop, but I need it to stay online). But every day or two it keeps disconnecting from this network. I was wondering, is there any way to set the system to connect automatically at specific time?
Asked
Active
Viewed 1,490 times
1 Answers
1
You can use nmcli and cron to bringing up connection at specific time.
First you create connection using Network-Manager.
Then start terminal to test some things
list all NM connections:
nmcli constart connection:
nmcli con up id ConnectionNamedown connection:
nmcli con down id ConnectionName
If work, setup cron to trigger connection
sudo crontab -e
at the end add
45 10 * * * nmcli con up id bdc
this will trigger command every day at 10 h and 45 min.
In cron you can specify min, hour, day, month ...
Also you can start connectio every min
* * * * * nmcli con up id bdc
More example how to setup time in cron can find here
2707974
- 10,758