how to create a cron expression for every 2 weeks

You need to specify a start day. Otherwise it's will always reset with the 1st day of the month. So this expression "0 0 0 23/14 OCT ? 2017" is every 2 weeks starting on October 23rd 2017


Friday every two weeks:

0 0 * * Fri [ $(expr $(date +%W) \% 2) -eq 1 ] && /path/to/command

Found on: https://cron.help/every-2-weeks-on-friday


There is no direct cron expression for every 2 weeks but I kept following cron expression , which is similar to 2 weeks but not exactly for 2 weeks

cron for every 2weeks(on 1st and 15th of every month at 1:30AM) - 30 1 1,15 * *

Tags:

Cron