Skip to content

Instantly share code, notes, and snippets.

@vraravam
Last active October 21, 2025 03:24
Show Gist options
  • Select an option

  • Save vraravam/4ffa42fdde16ad4a03ed5709fb198767 to your computer and use it in GitHub Desktop.

Select an option

Save vraravam/4ffa42fdde16ad4a03ed5709fb198767 to your computer and use it in GitHub Desktop.
cron job template
# Reference: https://crontab.guru/
# Note: 'chronic' is a utility installed using 'moreutils' from homebrew and is needed so that a successful run of any cron job does not cause a mail to get generated
# Env
SHELL=/opt/homebrew/bin/zsh
USERNAME=vijay
HOME="/Users/${USERNAME}"
DOTFILES_DIR="${HOME}/.dotfiles"
PERSONAL_PROFILES_DIR="${HOME}/personal/${USERNAME}/profiles"
# Needed for chronic to be in the PATH
PATH=/opt/homebrew/bin:/usr/bin
0 */3 * * * chronic zsh -lsc "${DOTFILES_DIR}/scripts/software-updates-cron.sh"
# Note: Commented out since this causes system memory to be used up and the whole OS crashes. Better to run this manually as needed.
# 15 * * * * chronic zsh -lsc "git -C \"${HOME}\" cc; git -C \"${PERSONAL_PROFILES_DIR}\" cc"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment