/srv/irclogs.ubuntu.com/2020/11/07/#ubuntu-server.txt

SkyriderGreetings08:50
mybalzitchHello08:52
SkyriderI have a slight, problem. Im running timers/service files for a few of my scripts. But whenever the system restarts, the timers also run. https://paste.ubuntu.com/p/hzZgDsk8W6/08:55
SkyriderI was wondering what option I should use so timers run on on the set time, rather than right away on boot.08:56
mgedminSkyrider: your question is going to haunt me09:41
SkyriderHow so?09:41
mgedminaccording to the systemd.timer manual page it should already be happening that way, since you don't have Persistent=true in your timer unit09:42
mgedminis that the only unit file?  no overrides etc?09:42
SkyriderThose are the only files. Any many other timer/service files like that one. Just pinpointing to different sh script files.09:44
fricklerSkyrider: are you sure that the timer actually runs or does it just start your service because of your "Requires" statement?14:40
Skyriderfrickler: As far as I know, timer runs the service which runs the script. Has been working for over a year.15:32
SkyriderJust the service runs at start-up. While I only enabled the timer15:33
tewardSkyrider: i would check your syslog to see when the timer executes, etc.  Or journalctl to make sure it actually executes the timer.16:27
tewardtimers DO run at boot if they're configured to I believe, and that's "Usual Behavior"16:28
tewardas is servic estartup :p16:28
SkyriderYour first line, you refer to the boot up or if the timers actually work?16:29
Skyrider`Or journalctl to make sure it actually executes the timer` - You mean if the service or timer starts on boot.16:30
tewardboth.  `journalctl -u whatever.timer` or `journalctl -u whatever.service` will show the respective information about either unit16:30
tewardcompare times from when you booted your computer and you can determine if one or both actually execute on boot or if you're imagining it16:30
SkyriderCan't imagen it.. XD, one of the scripts is set to RM a directory once a week.16:32
SkyriderIf the boot up suddenly erases the directory before the timer, then ya.. :p16:32
tewardso i think you meant to have that service be a oneshot unless it's a daemon16:32
tewardtimers calling the oneshot on the specified time16:33
tewardbut let's start by checking the journalctl output to see what's actually happening - whether the timer is running or the service is running on boot ;)16:33
SkyriderIts weird though.. I only enabled the timer, not the service.16:33
SkyriderBut ya.. I'll just relaunch the lxc container and keep backups to check the logs.16:34
tewardi mean I still use `cron` jobs for things - because they don't have any weirdness with timer execution and such)16:44
tewardbut that's just me :P16:44
RoyKSeems Trump won't give up, just like the black night https://www.youtube.com/watch?v=2eMkth8FWno </slightlyofftopic>16:54
Skyriderteward: Crons has its limits.20:21
SkyriderEspecially when it comes to seconds I believe.20:21
jayjoI'm trying to automate a server installation that I'm installing with a USB... referencing https://ubuntu.com/server/docs/install/autoinstall. There is a line about "This is to make it harder to accidentally create a USB stick that will reformat a machine it is plugged into at boot." - how do I put the config on the bootable USB so it will install automatically?20:48
jayjoMost examples are for netboots20:48

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!