#crontab
3 one-liners with this tag.
All one-liners tagged crontab
Add a cron job that logs its output
$(crontab -l 2>/dev/null; echo "*/15 * * * * /usr/bin/php /var/www/vhosts/example.com/httpdocs/wp-cron.php >> /var/www/vhosts/example.com/logs/wp-cron.log 2>&1") | crontab -
Back up the crontab to a dated file
$crontab -l > ~/crontab-backup-$(date +%F).txt
Show the crontabs of all users at once
#for u in $(cut -d: -f1 /etc/passwd); do crontab -l -u "$u" 2>/dev/null | grep -vE '^(#|$)' | sed "s/^/$u: /"; done