Quantcast
Channel: openSUSE Forums
Viewing all articles
Browse latest Browse all 40713

OS 13.1 - Systemd/user timer and timer service install - unable to make it works

$
0
0
Hello.
I am unable to make systemd/user timer to run.
For clarity :
The user name is : "some_user" (/home/some_user)

Systemd install directory : /home/some_user/config/systemd/user


Here what I have try :

User profile addition ( /home/some_user/.profile ) :
Code:

systemctl --user
user timer and service configuration :
/home/some_user/config/systemd/user/user_timer.timer
Code:

[Unit]
# Directory : /home/some_user/.config/systemd/user
# file      : user_timer.timer
Description=start every minutes : /home/some_user/bin/user_timer.service which run /home/some_user/bin/user_script_tmr

[Timer]
# Time to wait after booting before we run first time
#OnBootSec= NOT_IN_USE
#
# Time between running each consecutive time
OnUnitActiveSec=1min
#
Unit=user_timer.service

[Install]
#WantedBy=default.target
WantedBy=multi-user.target

/home/some_user/config/systemd/user/user_timer.service
Code:

[Unit]
# Directory  : /home/some_user/.config/systemd/user
# file        : user_timer.service
# enable with : NOT IN USE
# Started by : user_timer.timer
Description=user_timer.service to run  /home/some_user/bin/user_script_tmr

[Service]
EnvironmentFile=/home/some_user/.config/systemd/user/user_timer.conf
#
Type=simple
#
ExecStart=/home/some_user/bin/user_script_tmr  ${TEXT}

After enabling the timer
Code:

systemctl --user enable user_timer.timer
There is a directory : "/home/some_user/config/systemd/user/multi-user.target.wants"
with inside : a link to "user_timer.timer"

Code:

LINUX-TEST-123: systemctl daemon-reload
LINUX-TEST-123: systemctl --user start  user_timer.timer
LINUX-TEST-123: systemctl --user status  user_timer.timer
user_timer.timer - start every minutes : /home/some_user/bin/user_script_tmr
  Loaded: loaded (/home/some_user/.config/systemd/user/user_timer.timer; enabled)
  Active: active (elapsed) since Sat 2014-09-27 11:41:30 CEST; 5s ago

Sep 27 11:41:30 LINUX-TEST-123 systemd[3194]: Starting start every minutes : /home/some_user/bin/user_script_tmr.
Sep 27 11:41:30 LINUX-TEST-123 systemd[3194]: Started start every minutes : /home/some_user/bin/user_script_tmr.
LINUX-TEST-123:~ #

journalctl show nothing more 1 time :

Code:

Sep 27 11:41:30 LINUX-TEST-123 systemd[3194]: Starting start every minutes : /home/some_user/bin/user_script_tmr.
Sep 27 11:41:30 LINUX-TEST-123 systemd[3194]: Started start every minutes : /home/some_user/bin/user_script_tmr.

Any help is welcome.

Viewing all articles
Browse latest Browse all 40713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>