1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Pause or resume cron job through php script

Discussion in 'PHP' started by KRISHNA KUMAR, Apr 20, 2009.

  1. #1
    Hi guy's can any one help me. How to pause or resume cron job through php script.
    KRISHNA KUMAR, Apr 20, 2009 IP
  2. SmallPotatoes

    SmallPotatoes Peon

    Likes Received:
    Best Answers:
    Trophy Points:
    You mean a job that's in progress? Your script can sleep() as long as it wants to keep the job from progressing further.

    If you mean editing the crontab file, you can edit the crontab files directly (maybe in /var/spool/cron) but be very careful about permissions. You'll most likely have to use sudo to grant access to copy the new file over, and whatever you do, don't allow a web-accessible PHP script to edit root's crontab.
    SmallPotatoes, Apr 20, 2009 IP