cron job help

Discussion in 'General Linux' started by sahabcse, Jan 3, 2013.

  1. sahabcse

    sahabcse New Member

    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Hi All

    I want to run the script on Tuesdays (On Dates Between 1-7 and 15-21) at 12:00 PM of every month.

    I have tried the below entry, but it is not working proper. Please help

    00 12 1-7,15-21 * TUE /root/script.sh


    Thanks in Advance
    Sahab
  2. old_bolvan

    old_bolvan New Member

    Messages:
    15
    Likes Received:
    3
    Trophy Points:
    3
    Code:
    00 12 1-7,15-21 * * test $(date +%u) -eq 2 && /root/script.sh

Share This Page