CDIST-TYPE__CRON(7)
π cdist-type__cron β a.k.a. the __cron type from cdist β¨
okay bestie, gather round, because this is the manual page for cdist-type__cron and it's literally the moment your server's to-do list gets its whole life together. ππ
πΈ NAME πΈ
cdist-type__cron β installs and manages cron jobs, fr fr. π
π¦ DESCRIPTION π¦
This cdist type lets you manage entries in a user's crontab. That's it, that's the vibe. You want stuff to happen on a schedule? This is the girl for the job. obsessed. β¨
π REQUIRED PARAMETERS π
no skipping these, they're mandatory bestie π€
userβ the user whose crontab is getting edited. not optional, not negotiable, we need to know who we're scheduling for. π«Άcommandβ the command to run. the actual thing that's gonna go do the thing. π
π OPTIONAL PARAMETERS π
β οΈ NOTE: all the time-related parameters (--minute,--hour,--day_of_month,--monthand--day_of_week) default to*, which means execute it always. so if you set--hour 0thinking "aww yeah midnight only", it will actually run every minute in the first hour of the morning, all days. the way that*sneaks in on the other fieldsβ¦ π watch out for that one. it's giving "I thought I was being specific" energy. π
stateβ eitherpresentorabsent. defaults topresent. useabsentwhen you want it GONE, periodt. πminuteβ seecrontab(5). defaults to*. πhourβ seecrontab(5). defaults to*. πday_of_monthβ seecrontab(5). defaults to*. πmonthβ seecrontab(5). defaults to*. πday_of_weekβ seecrontab(5). defaults to*. ποΈrawβ takes whatever the user has given instead of the time and date fields. if you give this, all other time and date fields are ignored. you can use it for cron EXTENSIONS likereboot,yearly, etc. checkcrontab(5)for the extensions your cron implementation actually implements, iykyk. π₯raw_commandβ takes whatever the user gave in the command and ignores everything else. if you give this, the command gets added to the crontab. this is your girl for defining variables likeSHELLorMAILTO. π§
π EXAMPLES π
the moment you've all been waiting for, bestie. real code, real slay. π
run Monday to Saturday at 23:15:
__cron some-id --user root --command "/path/to/script" \
--hour 23 --minute 15 --day_of_week 1-6
run on reboot:
__cron some-id --user root --command "/path/to/script" \
--raw @reboot
remove cronjob:
__cron some-id --user root --command "/path/to/script" --state absent
define default shell:
__cron some-id --user root --raw_command --command "SHELL=/bin/bash" \
--state present
β SEE ALSO β
crontab(5)β go read it, it's the lore. π
π AUTHORS π
- Steven Armstrong
<steven-cdist--@--armstrong.cc>β the icon, the legend. π
πΈ COPYING πΈ
Copyright (C) 2011-2013 Steven Armstrong. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. πβ¨
π COPYRIGHT π
ungleich GmbH 2021 π«Ά
and that's the whole page bestie!! π this was cdist version 7.0.0, dated Jul 31, 2022 β go schedule something iconic, you've got this, mwah π ππ¦β¨
π¦ where this page comes from
- fedora 43: cdist 7.0.0-16.fc43 Β· GPL-3.0-only
- fedora 44: cdist 7.0.0-18.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms