$HOME/.config/systemd/user/ofls-bot.serviceに以下を書く
[Unit]
Description=ofls-bot-service
[Service]
Type=simple
ExecStart=/home/s1200107/.pyenv/shims/python /home/s1200107/Dropbox/Works/ofls-bot/ofls_bot.py
[Install]
WantedBy=default.target
$HOME/.config/systemd/user/ofls-bot-everyday.timerに以下を書く
[Unit]
Description=ofls bot every day, How annoying!
[Timer]
OnCalendar=*-*-* 00:00:00
Unit=ofls-bot.service
[Install]
WantedBy=timers.target
で、
$ systemctl --user start ofls-bot.service
ユニット起動
$ systemctl --user start ofls-bot-everyday.timer
起動時実行
$ systemctl --user enable ofls-bot-everyday.timer
環境変数を引き継ぐ簡単な方法
$ systemctl --user import-environment