I try to schedule a task in Ubuntu 16.04 using crontab:
45 2 * * 4/2 sh /var/lib/libvirt/images/backups/backup_res.sh
I want it to be executed every other Thursday at 2:45AM. However, I keep getting bad day-of-week error. If I remove /2, it works fine. What could be the problem?
I think the best way is:
45 2 * * Thu expr `date +\%s` / 604800 \% 2 >/dev/null || sh /var/lib/libvirt/images/backups/backup_res.sh
please see this Q&A