Closed Thread
Results 1 to 10 of 10

Thread: Help with Cron job needed
      
   

  1. #1
    geedo is offline Private
    Join Date
    Dec 2007
    Posts
    4

    Default 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. #2
    geedo is offline Private
    Join Date
    Dec 2007
    Posts
    4

    Default 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?

  3. #3
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,053

    Default 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!


  4. #4
    geedo is offline Private
    Join Date
    Dec 2007
    Posts
    4

    Default 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?

  5. #5
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,053

    Default 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!


  6. #6
    geedo is offline Private
    Join Date
    Dec 2007
    Posts
    4

    Default 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

  7. #7
    playmode is offline Private First Class
    Join Date
    Mar 2008
    Posts
    7

    Default 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

  8. #8
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,053

    Default 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!


  9. #9
    playmode is offline Private First Class
    Join Date
    Mar 2008
    Posts
    7

    Default 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

  10. #10
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,053

    Default 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!


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49