You are not logged in.

#1 2014-08-27 22:59:08

Fandekasp
Member
From: Japan
Registered: 2012-02-12
Posts: 25
Website

systemctl timer not persistent

I wrote this small user timer:

# /etc/systemd/user/memrise.timer

[Unit]
Description=daily scraping of memrise items

[Timer]
OnCalendar=daily
# run immediately if we missed a backup for some reason
Persistent=true
AccuracySec=15

[Install]
WantedBy=timers.target


# /etc/systemd/user/memrise.service

[Unit]
Description=scraping of memrise items

[Service]
Nice=19
IOSchedulingClass=2
IOSchedulingPriority=7
ExecStart=/home/dori/bin/memrise_stats --save-kanji-learnt

But the timer is not behaving as expected. When my computer is sleeping between 0am and 0:15am, I want the job to start as soon as the computer awakes, and I thought that was what

Persistent=true

was for. Yet, every morning I need to manually run

$ systemctl --user start memrise

.

What have I been missing?
Thanks in advance!

Offline

#2 2014-08-27 23:03:24

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: systemctl timer not persistent

Fandekasp wrote:

What have I been missing?

Did you enable the timer?

Offline

#3 2014-08-27 23:07:32

Fandekasp
Member
From: Japan
Registered: 2012-02-12
Posts: 25
Website

Re: systemctl timer not persistent

I thought I did it after writing the script, but now that I'm checking it, I'm getting those errors:

$ systemctl --user enable memrise.service
Failed to execute operation: No such file or directory
$ sudo systemctl --user enable memrise.service    ⏎
[sudo] password for dori:
Failed to get D-Bus connection: Connection refused
$  

weird.

Offline

Board footer

Powered by FluxBB