Path: ...!feed.opticnetworks.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.os.linux.advocacy Subject: Re: =?UTF-8?B?U3lzdMOobWU=?= D Date: Tue, 25 Jun 2024 06:55:14 -0000 (UTC) Organization: A noiseless patient Spider Lines: 22 Message-ID: References: <6627ecd2$0$3711206$882e4bbb@reader.netnews.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 25 Jun 2024 08:55:14 +0200 (CEST) Injection-Info: dont-email.me; posting-host="250b38e1e4730787d8a829a06e323428"; logging-data="1524803"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//DplVG407ZMdBV6jIm3+d" User-Agent: Pan/0.158 (Avdiivka; ) Cancel-Lock: sha1:zqh2lpla8I9uubEvVNSCRLE42Tw= Bytes: 2174 On Tue, 25 Jun 2024 06:10:03 -0000 (UTC), candycanearter07 wrote: > Lawrence D'Oliveiro wrote at 05:56 this Tuesday (GMT): > >> On Sun, 19 May 2024 09:37:28 -0000 (UTC), Sebastian wrote: >> >>> One thing you can't do with Systemd is write a simple shell script >>> that runs when the system finishes booting, without having to learn >>> any of the ins and outs of Systemd. >> >> Sure you can. Just have a “WantedBy” dependency in your service >> definition on whichever target represents the state you want the script >> to run in, e.g. “multi-user.target” for normal system operation. > > Or use @reboot in your crontab. In systemd, timer definitions have to do with time, not to do with whether the system is rebooting. (Though you can define time relative to when the system starts, if you want.) This is a cleaner approach than crontab, which is trying to stuff a number of different functions into an ill-fitting box.