Running php file everyday on scheduled time

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sachu

    #1

    Running php file everyday on scheduled time

    Hi,
    Is there is way to run a php file perodically everyday on scheduled
    time in such a way that there is no human interaction and it
    performence the written task.

  • Rik

    #2
    Re: Running php file everyday on scheduled time

    sachu wrote:
    Hi,
    Is there is way to run a php file perodically everyday on scheduled
    time in such a way that there is no human interaction and it
    performence the written task.
    Usually that's done using a cronjob on the server.

    Grtz,
    --
    Rik Wasmus


    Comment

    • Veco

      #3
      Re: Running php file everyday on scheduled time

      I'm also having this issue on Windows server

      Any ideas?

      "sachu" <sachinbs100@gm ail.comwrote in message
      news:1153486154 .330017.272510@ 75g2000cwc.goog legroups.com...
      Hi,
      Is there is way to run a php file perodically everyday on scheduled
      time in such a way that there is no human interaction and it
      performence the written task.
      >

      Comment

      • bobmct

        #4
        Re: Running php file everyday on scheduled time

        sachu wrote:
        Hi,
        Is there is way to run a php file perodically everyday on scheduled
        time in such a way that there is no human interaction and it
        performence the written task.
        I do this every night with several php scripts that DO things in an
        unattended mode.

        I make sure that I have the proper shebang (#!/usr/bin/php) as the first
        statement of my script, then I create a cron job to run at the specified
        time to execute the appropriate php script(s).

        Works like a charm.

        Bob

        Comment

        • Krustov

          #5
          Re: Running php file everyday on scheduled time

          <comp.lang.ph p>
          <bobmct>
          <Fri, 21 Jul 2006 11:29:16 -0400>
          <un6wg.8$5v3.69 6@news.ntplx.ne t>
          Is there is way to run a php file perodically everyday on scheduled
          time in such a way that there is no human interaction and it
          performence the written task.
          >
          I do this every night with several php scripts that DO things in an
          unattended mode.
          >
          I make sure that I have the proper shebang (#!/usr/bin/php) as the first
          statement of my script, then I create a cron job to run at the specified
          time to execute the appropriate php script(s).
          >
          Works like a charm.
          >


          Not a cron job - but the first person to look at the webpage after
          midnight will fire up the 'process loops' and then save the results so
          they can just be read in anytime afterwards .

          $junko=date("l dS of F Y h:i:s A"); $coke=substr($j unko,0,5);

          $filename="demo/day_popular.php ";
          $fp=fopen($file name,"r"); $qaz=fgets($fp) ; $pepsi=trim($qa z); fclose
          ($fp);

          if ($coke<>$pepsi)
          {

          BLAH BLAH RUN THE LOOPS - AND SAVE THE RESULTS

          $filename="demo/day_popular.php ";
          $fp=fopen($file name,"w"); fwrite ($fp,$coke); fwrite ($fp,"\n"); fclose
          ($fp);
          }


          --
          Encrypted email address

          Make a shorter url

          Comment

          • Jerry Stuckle

            #6
            Re: Running php file everyday on scheduled time

            Veco wrote:
            I'm also having this issue on Windows server
            >
            Any ideas?
            >
            "sachu" <sachinbs100@gm ail.comwrote in message
            news:1153486154 .330017.272510@ 75g2000cwc.goog legroups.com...
            >
            >>Hi,
            >>Is there is way to run a php file perodically everyday on scheduled
            >>time in such a way that there is no human interaction and it
            >>performence the written task.
            >>
            >
            >
            >
            In Windows you use Scheduled Tasks.

            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            • sachu

              #7
              Re: Running php file everyday on scheduled time

              Can someone tell me the steps require to sheduele a php file...
              This particular file checks the remote database for data modification
              and update the same in the local database.This is periodic check and
              has to be done in daily basis.
              How can i schedule. please let me know in detail as am a newbie to this
              php world.
              Iam Using PHP5.0 Mysql and IIS.

              Comment

              • Jerry Stuckle

                #8
                Re: Running php file everyday on scheduled time

                sachu wrote:
                Can someone tell me the steps require to sheduele a php file...
                This particular file checks the remote database for data modification
                and update the same in the local database.This is periodic check and
                has to be done in daily basis.
                How can i schedule. please let me know in detail as am a newbie to this
                php world.
                Iam Using PHP5.0 Mysql and IIS.
                >
                Scheduling the file is a Windows (or other OS) task. Check with your
                Windows Administrator or search Microsoft for "Scheduled Task".

                The executable will be your php.exe file with the parameter being your
                script.

                --
                =============== ===
                Remove the "x" from my email address
                Jerry Stuckle
                JDS Computer Training Corp.
                jstucklex@attgl obal.net
                =============== ===

                Comment

                Working...