Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos-caddy
Commits
cdb2701f
Commit
cdb2701f
authored
Aug 28, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dcron recipe: do not use @foo syntax because it requires to give an ID
parent
4577f666
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
slapos/recipe/dcron.py
slapos/recipe/dcron.py
+8
-2
No files found.
slapos/recipe/dcron.py
View file @
cdb2701f
...
...
@@ -79,11 +79,17 @@ class Part(GenericBaseRecipe):
day_of_week_dict
=
dict
((
name
,
dow
)
for
dow
,
name
in
enumerate
(
"sunday monday tuesday wednesday thursday friday saturday"
.
split
())
for
name
in
(
name
,
name
[:
3
]))
symbolic_dict
=
dict
(
hourly
=
'0 * * * *'
,
daily
=
'0 0 * * *'
,
monthly
=
'0 0 1 * *'
,
weekly
=
'0 0 * * 0'
)
def
systemd_to_cron
(
spec
):
"""Convert from systemd.time(7) calendar spec to crontab spec"""
if
spec
in
(
"hourly"
,
"daily"
,
"monthly"
,
"weekly"
):
return
'@'
+
spec
try
:
return
symbolic_dict
[
spec
]
except
KeyError
:
pass
if
not
spec
.
strip
():
raise
ValueError
spec
=
spec
.
split
(
' '
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment