I was interested to see if I could launch a small program at one-second intervals, so I wrote a small python script to write a two variable row<snip>
to a database (timestamp, 10 character string). Not wanting to create
the X.service/X.timer entries in /etc/systemd/, I set up a transient
systemd timer as follows:
systemd-run --timer-property=AccuracySec=1us --on-calendar '*:*:1' /home/graeme/Software/Python/write1.py
expecting the '*:*:1' string to be interpreted as every second.
However results were very strange:
2022-08-11 15:00:01.04493 | abcdefghij
2022-08-11 15:00:01.04534 | abcdefghij
Have I misunderstood the specification of the "on-calendar" parameter?
On Fri, 12 Aug 2022 05:31:30 -0400, Grimble <grimble@nomail.afraid.org> wrote:
I was interested to see if I could launch a small program at one-second<snip>
intervals, so I wrote a small python script to write a two variable row
to a database (timestamp, 10 character string). Not wanting to create
the X.service/X.timer entries in /etc/systemd/, I set up a transient
systemd timer as follows:
systemd-run --timer-property=AccuracySec=1us --on-calendar '*:*:1'
/home/graeme/Software/Python/write1.py
expecting the '*:*:1' string to be interpreted as every second.
However results were very strange:
2022-08-11 15:00:01.04493 | abcdefghij
2022-08-11 15:00:01.04534 | abcdefghij
Have I misunderstood the specification of the "on-calendar" parameter?
I've never used systemd-run. On Mageia 8 none of the man pages mention --timer-property=AccuracySec. That may be something that was added in a
newer version of systemd.
Mageia 8 has version 246. The online documentation mentions "By default, the timer will execute a random amount of time between when the specified time is reached, and one minute after"
Since the m8 version doesn't appear to support the timer-property so gets the random timing.
Cauldron currently has systemd version 251.
Are you using m8 or a cauldron install?
On Fri, 12 Aug 2022 21:53:46 -0400, David W. Hodgins wrote:
On Fri, 12 Aug 2022 05:31:30 -0400, Grimble <grimble@nomail.afraid.org> wrote:
I was interested to see if I could launch a small program at one-second<snip>
intervals, so I wrote a small python script to write a two variable row
to a database (timestamp, 10 character string). Not wanting to create
the X.service/X.timer entries in /etc/systemd/, I set up a transient
systemd timer as follows:
systemd-run --timer-property=AccuracySec=1us --on-calendar '*:*:1'
/home/graeme/Software/Python/write1.py
expecting the '*:*:1' string to be interpreted as every second.
However results were very strange:
2022-08-11 15:00:01.04493 | abcdefghij
2022-08-11 15:00:01.04534 | abcdefghij
Have I misunderstood the specification of the "on-calendar" parameter?
I've never used systemd-run. On Mageia 8 none of the man pages mention
--timer-property=AccuracySec. That may be something that was added in a
newer version of systemd.
Mageia 8 has version 246. The online documentation mentions "By default, the >> timer will execute a random amount of time between when the specified time is
reached, and one minute after"
Since the m8 version doesn't appear to support the timer-property so gets the
random timing.
Cauldron currently has systemd version 251.
Are you using m8 or a cauldron install?
A quick
man -k systemd | grep -i time
give several selections on my mga 8 release.
$ man systemd.timer
and doing a
/AccuracySec
for searching gets me a AccuracySec description.
On Fri, 12 Aug 2022 22:34:35 -0400, Bit Twister <BitTwister@mouse-potato.com> wrote:Thanks both for your comments. After further reading and testing, it
On Fri, 12 Aug 2022 21:53:46 -0400, David W. Hodgins wrote:
On Fri, 12 Aug 2022 05:31:30 -0400, Grimble
<grimble@nomail.afraid.org> wrote:
I was interested to see if I could launch a small program at one-second >>>> intervals, so I wrote a small python script to write a two variable row >>>> to a database (timestamp, 10 character string). Not wanting to create<snip>
the X.service/X.timer entries in /etc/systemd/, I set up a transient
systemd timer as follows:
systemd-run --timer-property=AccuracySec=1us --on-calendar '*:*:1'
/home/graeme/Software/Python/write1.py
expecting the '*:*:1' string to be interpreted as every second.
However results were very strange:
2022-08-11 15:00:01.04493 | abcdefghij
2022-08-11 15:00:01.04534 | abcdefghij
Have I misunderstood the specification of the "on-calendar" parameter? >>>I've never used systemd-run. On Mageia 8 none of the man pages mention
--timer-property=AccuracySec. That may be something that was added in a
newer version of systemd.
Mageia 8 has version 246. The online documentation mentions "By
default, the
timer will execute a random amount of time between when the specified
time is
reached, and one minute after"
Since the m8 version doesn't appear to support the timer-property so
gets the
random timing.
Cauldron currently has systemd version 251.
Are you using m8 or a cauldron install?
A quick
man -k systemd | grep -i time
give several selections on my mga 8 release.
$ man systemd.timer
and doing a
/AccuracySec
for searching gets me a AccuracySec description.
That's for timer files such as /etc/systemd/system/fstrim.timer, not for
the
systemd-run command.
Regards, Dave Hodgins
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 481 |
Nodes: | 16 (2 / 14) |
Uptime: | 31:07:56 |
Calls: | 9,544 |
Calls today: | 4 |
Files: | 13,656 |
Messages: | 6,140,871 |