engine: resources: cron: Add lang examples
This commit is contained in:
committed by
James Shubin
parent
dbf0c84f0b
commit
8282f3b59c
9
examples/lang/cron0.mcl
Normal file
9
examples/lang/cron0.mcl
Normal file
@@ -0,0 +1,9 @@
|
||||
cron "purpleidea-oneshot" {
|
||||
session => true,
|
||||
trigger => "OnBootSec",
|
||||
time => "60",
|
||||
}
|
||||
|
||||
svc "purpleidea-oneshot" {
|
||||
session => true,
|
||||
}
|
||||
3
examples/lang/cron1.mcl
Normal file
3
examples/lang/cron1.mcl
Normal file
@@ -0,0 +1,3 @@
|
||||
cron "purpleidea-oneshot" {
|
||||
state => "absent",
|
||||
}
|
||||
8
examples/lang/cron2.mcl
Normal file
8
examples/lang/cron2.mcl
Normal file
@@ -0,0 +1,8 @@
|
||||
cron "purpleidea-oneshot" {
|
||||
trigger => "OnUnitActiveSec",
|
||||
time => "2minutes",
|
||||
}
|
||||
|
||||
svc "purpleidea-oneshot" {}
|
||||
|
||||
file "/etc/systemd/system/purpleidea-oneshot.service" {}
|
||||
13
examples/lang/cron3.mcl
Normal file
13
examples/lang/cron3.mcl
Normal file
@@ -0,0 +1,13 @@
|
||||
$home = getenv("HOME")
|
||||
|
||||
cron "purpleidea-oneshot" {
|
||||
session => true,
|
||||
trigger => "OnCalendar",
|
||||
time => "*:*:0",
|
||||
}
|
||||
|
||||
svc "purpleidea-oneshot" {
|
||||
session => true,
|
||||
}
|
||||
|
||||
file printf("%s/.config/systemd/user/purpleidea-oneshot.service", $home) {}
|
||||
Reference in New Issue
Block a user