SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict chartahir's Avatar
    Join Date
    Oct 2006
    Location
    Karachi, Pakistan
    Posts
    253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Automatic execution of php script

    I want a php script to execute automatically after a certain period of time (almost after onte month) , how can i do that ?

    I want to check the membership expiration using this.
    chartahir

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you looked into using a cron job to execute a PHP script? This link should be able to help you.

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)

    run on time

    Ideally you could do this with CRON but if your host doesnt have this a "psuedo-cron" PHP script may work OK (extra resource overhead and not "to the split-second" guaranteed).

  4. #4
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there's 2 ways to do it.
    If you have access to the schedualer on the machine your site is running, you can use cron (linux) or at(windows).

    Other wise you'll have to what Mittineaque said - psudeo-cron, basicly that's a script that is called from your website as a 1px image usally, and it works out if it needs to run or not, if it does, it runs, otherwise it just throws out a transparent image and goes back to sleep =)

  5. #5
    SitePoint Addict chartahir's Avatar
    Join Date
    Oct 2006
    Location
    Karachi, Pakistan
    Posts
    253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks i'll look at it.
    chartahir


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •