Need script to stop/start a service at a specified time

Discussion in 'Apache' started by bk871, Mar 30, 2010.

  1. #1
    Hello everyone,

    I have a special project that requires Apache to be stopped at a time (specified by me) and start (at a time specified by me)

    Linux - CentOS

    It doesnt matter if it's a script, or if it's a sort of cron.

    Does anyone know how to do this?

    Thank-you!

    Edit -- I've got it :) Thanks anyways.

    You can use the crontab (crontab -e)
    Add @midnight /path/to/script.sh

    :)
     
    Last edited: Mar 30, 2010
    bk871, Mar 30, 2010 IP