this post was submitted on 26 Feb 2024
38 points (95.2% liked)

Linux

48332 readers
438 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hi folks, Does anyone know how to instruct cron to carry out a command when a connection to the internet is first made after boot? I have a few jobs that only need to be done once per day and require an internet connection e.g downloading the weather forecast and my rss feeds. I'm not always connected to the internet on boot and do not have the computer switched on at the same times every day. Many thanks for any suggestions.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 32 points 9 months ago (1 children)

Systemd timers are able to do this. Set it up to run daily and make it require the network-online.target.

[–] [email protected] 13 points 9 months ago (1 children)

network-online.target is not technically about being connected to the internet but just having a network connection.

[–] [email protected] 12 points 9 months ago

Yeah, I needed something similar and made a new target that checks whether the system can reach a common website like google