Jump to content

Exclude an hour in Cron?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Pan

Pan

    Learning Programmer

  • Members
  • PipPipPip
  • 61 posts
I have a script:

/usr/local/checkapache

and I want it to run every 20 minutes for every hour except 2-3 AM (when the apache server temporarily shuts down). How do I "exclude" an hour?

#2
Valor

Valor

    Learning Programmer

  • Members
  • PipPipPip
  • 30 posts
Couldn't you just list the hours.... 1,4,5,6,7,8,9....... Excluding 2-3?

#3
erick99

erick99

    Newbie

  • Members
  • Pip
  • 7 posts

Valor said:

Couldn't you just list the hours.... 1,4,5,6,7,8,9....... Excluding 2-3?

That's what you are supposed to be able to do. Just leave it out of the list. It was designed to be very flexible.