I would like to create a timer that launch a command every 2 months (the first of the month)
I already do that with a cron, but I would like to do the same with systemd and get rid of cron.
I have a problem because when I start my timer, systemd refused to activate it with the following error:
systemd: Starting Start my timer.
systemd: myservice.timer failed to enter waiting state: Invalid argument
systemd: Failed to start Start my timer
systemd: Unit myservice.timer entered failed state.
I used the two following units:
*myservice.timer*
[Unit]
Description=Start my timer
[Timer]
OnCalendar=*-01/2-01 00:00:01
Persistent=true
WakeSystem=true
[Install]
WantedBy=timers.target
*myservice.service*
[Unit]
Description=Start my command
[Service]
Type=oneshot
ExecStart=/usr/local/mycommand.sh
[Install]
WantedBy=multi-user.target
I suppose it doesn't work because it miss a parameter or the OnCalendar parameter is not good. I am on Debian Jessie.
Thank you.
Asked by Guillaume
(121 rep)
Feb 16, 2016, 09:18 PM