Search code examples
croncron-task

How to set a Cron job in Every one hour from 9:00 am to 6:00 pm ( Monday to Friday )


How to set a Cron job in Every one hour from 9:00 am to 6:00 pm ( Monday to Friday)

I am using Hostgator cron job to send mail every one hour, Now I want it from Monday to Friday. below is the link to screen shot.

http://awesomescreenshot.com/0123cmfxe1

enter image description here


Solution

  • This should work:

    0 9-18 * * 1-5 /path_to_script
    

    EDIT:

    In the format of the boxes it would be

    0
    9-18
    *
    *
    1-5