Skip to content

Instantly share code, notes, and snippets.

Created March 1, 2021 12:55
What would you like to do?
Run command as cron
# env - run a program in a modified environment
# envirotnment is read from crontab file, usually it's below and nothing else:
# SHELL=/bin/sh
# PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
env - `cat /etc/crontab | grep -v "#" | grep -v "^$" | grep -v /etc/cron`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment