Announcement

Collapse
No announcement yet.

Help with Cron job needed

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

  • Help with Cron job needed

    I have now tried about everything to get my cron job running but any way I try it, I get an error message.

    Here is what I tried first:

    php /home/myusername/public_html/promoter/auto_scripts/auto_emails.php?script_act=1

    Which results in this error message:
    Status: 404
    X-Powered-By: PHP/5.2.4
    Content-type: text/html

    No input file specified.

    Next thing I tried was:

    GET http://www.mydomain.com/promoter/auto_scripts/auto_emails.php?script_act=1

    Which resulted in:
    /bin/sh: GET: command not found

    The php file works fine when I call it up in my browser.
    Can somebody please tell me how to call up that php script in a cron job?

    Thanks

    Guido

  • #2
    Re: Help with Cron job needed

    Hmm, now I tried

    /usr/local/bin/php -q /home/...

    and I get the error "Could not open input file:"

    I have tried to chmod that file to 777, 755 and 644 but nothing works.

    Anybody here who can help?

    Comment


    • #3
      Re: Help with Cron job needed

      MAke sure that "readfile" is enabled in your server. Ask the help desk. Also you can have a look at the error log on the server, it probably has a error message that would enlight you.
      Navaldesign
      Logger Lite: Low Cost, Customizable, multifeatured Login script
      Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
      DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
      Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

      Comment


      • #4
        Re: Help with Cron job needed

        Well, I already contacted the support... here is what they said:
        " You will not be able to run a cron this way auto_emails.php?script_act=1, you will need to call a script that will run this command for you."

        Doesn't make sense to me... why should it not be possible to run a php script from a cron?

        My error log doesn't tell me anything useful, it only shows 404 errors.

        I am really confused... hasn't anybody called up a php script with a cron before?

        Comment


        • #5
          Re: Help with Cron job needed

          Ok, try this:

          select in the Cron Jobs section of CP, Standard (not Unix, is more difficult) and select every hour (or whatever the period you want to be). Then in the command line enter this:

          cd '/home/yourusername/public_html/'; php -q 'auto_emails.php?script_act=1' > /dev/null ;

          Of course, if the script is not in public_html, add the necessary /foldername to the above , immediately after public_html
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment


          • #6
            Re: Help with Cron job needed

            Alright, it works now. When posting to the Warrior Forum they told me to try it this way:

            wget http://www....

            This works fine.

            Guido

            Comment


            • #7
              Re: Help with Cron job needed

              Hello,

              I'm trying to set-up the Cron Jobs to run but I'm not sure want command line to use.

              This is the file I need to use:
              /home/azbirjx/public_html/purchase-credits.php


              I tried "cd '/ home/azbirjx/public_html/'; php -q 'purchase-credits.php' > /dev/null ;"
              still not getting any emails.


              In the Control Panel in the Cron Job it is indicating the following:
              /usr/bin/crontab permissions are wrong. Please set to 4755

              Where is this file located and how do I access it so I can change the permissions

              Thank you,

              playmode

              Comment


              • #8
                Re: Help with Cron job needed

                Your command is correct. If no emails are sent hrough the cron job, probably you have not correctly setup the cron job time parametres in your control panel.

                On the other hand, the last message indicates that you have no permissions to setup a cron job, not because it is your falut, but because the permissions are wrong. Submit a support ticket describing the problem.
                Navaldesign
                Logger Lite: Low Cost, Customizable, multifeatured Login script
                Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                Comment


                • #9
                  Re: Help with Cron job needed

                  Hello and thank you for your quick reply!

                  I sent a support ticket and they responded by telling me to try now!
                  I guess they fixed whatever needed to be fixed but when I went back to the control panel and clicked on Cron Jobs it was still displaying the message:

                  In the Control Panel in the Cron Job it is indicating the following:
                  /usr/bin/crontab permissions are wrong. Please set to 4755


                  Where is this file located and how do I access it so I can change the permissions? I have sent another email to support but I'm not sure how long they will take to respond to a reply email.

                  Please help!

                  Thank you

                  Comment


                  • #10
                    Re: Help with Cron job needed

                    You can't access that file, only the help desk. your ONLY choice is to have them fix it.
                    Navaldesign
                    Logger Lite: Low Cost, Customizable, multifeatured Login script
                    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                    Comment

                    Working...
                    X