The software you need for the "basic variant" (as you wrote: "chron job to shut off the wifi on my computer would be a pretty good start") is already available on your Linux machine:
- Cron for the timing
ifconfig to identify your WiFi interface
ifdown to connect/disconnect the interface
First step: find out what your WiFi interface is named. For that, simply run
ifconfig -a for more details). Not having WiFi on my Linux machine, I don't know what the name might be – for this example, let's assume it is
Next, adjust your Cron config. If it were a hourly/daily/weekly/monthly task, that would be as easy as placing scripts into
/etc/cron.(hourly|daily|weekly|monthly) – but we need a single action at a given time. So we place a new file into
/etc/cron.d, and call it e.g.
wifitoggle. It would go a bit far for this site to include a cron tutorial – but you can find one at help.ubuntu.com. Good idea to familiarize yourself with it, comes in handy the next time. For this time and lazyness, consider using a crontab generator. Add the generated lines (2, one for disconnecting at 1am (
ifdown wifi1), and another for re-establishing the connection (
ifup wifi1) at 7am or whatever) to the
/etc/cron.d/wifitoggle file and save it – you're done. Cron automatically detects new files in its vicinity or changes to them, and updates its schedules accordingly.