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, --month and --day_of_week) default to *, which means execute it always. so if you set --hour 0 thinking "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 β€” either present or absent. defaults to present. use absent when you want it GONE, periodt. πŸ‘‹
  • minute β€” see crontab(5). defaults to *. πŸ•
  • hour β€” see crontab(5). defaults to *. πŸ•‘
  • day_of_month β€” see crontab(5). defaults to *. πŸ“…
  • month β€” see crontab(5). defaults to *. πŸŒ™
  • day_of_week β€” see crontab(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 like reboot, yearly, etc. check crontab(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 like SHELL or MAILTO. 🧚

🌈 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. πŸ“œβœ¨


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