can i do it using cron in cpanel

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sherryonline@gmail.com

    can i do it using cron in cpanel

    i have a page and i need that page to be called every day at 12:00
    that page is going to connect to the database fetch some emails and
    will start mailing them how i am goning to do this.

  • Colin McKinnon

    #2
    Re: can i do it using cron in cpanel

    sherryonline@gm ail.com wrote:
    [color=blue]
    > i have a page and i need that page to be called every day at 12:00
    > that page is going to connect to the database fetch some emails and
    > will start mailing them how i am goning to do this.[/color]
    [color=blue]
    > can i do it using cron in cpanel[/color]

    erm maybe - if you gave some clues about what OS it's running on. Also WTF
    is cpanel?

    Certianly on *nix/Linux box cron is the tool to run jobs at regular
    intervals but:

    1) you need appropriate permissions to submit cron jobs
    2) you'll need to either run it using the standalone PHP executable (which
    may or may not be installed on your system) or use a command line tool like
    curl/lynx/wget... to fetch the page from the webserver.

    C.

    Comment

    • Chuck Anderson

      #3
      Re: can i do it using cron in cpanel

      sherryonline@gm ail.com wrote:
      [color=blue]
      >i have a page and i need that page to be called every day at 12:00
      >that page is going to connect to the database fetch some emails and
      >will start mailing them how i am goning to do this.
      >
      >
      >[/color]
      Just as you thought. Use the cpanel cron manager. (Are you having a
      specific problem?)

      --
      *************** **************
      Chuck Anderson • Boulder, CO

      Integrity is obvious.
      The lack of it is common.
      *************** **************

      Comment

      • sherryonline@gmail.com

        #4
        Re: can i do it using cron in cpanel

        can you guys write for me a command for me, like i have a page in
        www.mydomain.com/demo/messages.php and i want this page to be called
        from the cron job after every day

        Comment

        • sherryonline@gmail.com

          #5
          Re: can i do it using cron in cpanel

          i am using cpanel and i am a webmaster my project is developed in php
          and i can see that i have cron job faclility in cpanel. With standard
          and advance options can you please tell me which command should i set
          up so that it could open mypage.php every day . Thanks i advance

          Comment

          • George Self

            #6
            Re: can i do it using cron in cpanel

            sherryonline@gm ail.com wrote:
            [color=blue]
            > can you guys write for me a command for me, like i have a page in
            > www.mydomain.com/demo/messages.php and i want this page to be called
            > from the cron job after every day[/color]

            There are others who are much smarter than me and may be able to give you
            better advice. However, it crosses my mind that you may want to look at
            lynx. This is a text-only browser that will open a file from the command
            line. It will also process commands from a script. I would think it would
            be an easy job to create a short lynx script to open your php file and then
            exit. I suspect that if lynx simply accesses the php file it would "run"
            the code for you. It would then be a trivial exercise to insert that script
            into your crontab.

            --George

            Comment

            • Gleep

              #7
              Re: can i do it using cron in cpanel

              cron can be tricky to set up and it depends on how your ISP has things set up.
              but if you can get to the cron tab section you need to enter a command like this

              /usr/bin/php /home/httpd/vhosts/YOUR_DOMMANI.CO M/httpdocs/clients/CRON.php > /dev/null

              the first part of string tells cron "hey i want to run a PHP cron file and this is the location
              where PHP is located

              then there is a space

              then you need to specifiy the full path to the (the way the server sees it to the file you want to
              run as a cron)

              you also set the time interval if you want daily at noon put a 12 in the hours box
              you can put * in the other boxes

              another tip create a file called phpinfo.php
              in that file

              <?php
              phpinfo();
              ?>


              save > upload > and then run that file you will see all the settings and paths your server uses
              good tip for figuring out the cron command paths



              On Thu, 18 Aug 2005 09:18:17 +0100, Colin McKinnon <colin.deleteth is@andthis.mms3 .com> wrote:
              [color=blue]
              >sherryonline@g mail.com wrote:
              >[color=green]
              >> i have a page and i need that page to be called every day at 12:00
              >> that page is going to connect to the database fetch some emails and
              >> will start mailing them how i am goning to do this.[/color]
              >[color=green]
              >> can i do it using cron in cpanel[/color]
              >
              >erm maybe - if you gave some clues about what OS it's running on. Also WTF
              >is cpanel?
              >
              >Certianly on *nix/Linux box cron is the tool to run jobs at regular
              >intervals but:
              >
              >1) you need appropriate permissions to submit cron jobs
              >2) you'll need to either run it using the standalone PHP executable (which
              >may or may not be installed on your system) or use a command line tool like
              >curl/lynx/wget... to fetch the page from the webserver.
              >
              >C.[/color]

              Comment

              Working...