Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP6
systemd-generator-cron2timer
cron2timers
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File cron2timers of Package systemd-generator-cron2timer
#!/bin/bash # SPDX-License-Identifier: MIT # SPDX-FileCopyrightText: Copyright 2022-2023 SUSE LLC set -e out="${1:?}" shopt -s nullglob mkdir -p "$out/timers.target.wants/" for interval in hourly daily weekly monthly yearly; do for script in /etc/cron."$interval"/*; do f="${script##*/}" cat > "$out/$interval-$f.timer" <<-EOF [Unit] Description=Timer created from $script [Timer] OnCalendar=$interval AccuracySec=1h Persistent=true [Install] WantedBy=timers.target EOF cat > "$out/$interval-$f.service" <<-EOF [Unit] Description=Service created from $script ConditionACPower=true [Service] ExecStart=$script EOF ln -s "../$interval-$f.timer" "$out/timers.target.wants/$interval-$f.timer" done done
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor