Results 1 to 14 of 14
  1. #1

    how would i cron job this?

    heres the deal using cron jobs i want to run a .php script so many times an hour now how would i do that?

  2. #2
    You run something like:

    php /path/to/yourscript.php

    and specify also how often you want it to be executed.

  3. #3
    ok thanks so i do put path/to or the actual folders? and do i put public_html or the actual folder under that.

  4. #4
    /path/to is a placeholder to your script. you put the full path to where your script is.

  5. #5
    You run something like:

    php /path/to/yourscript.php

    and specify also how often you want it to be executed.
    Hello

    how can i run script on another my site (where i haven't access) to cronjob

    can i put something like this?

    php http://domain name.com/path/to/yourscript.php

    thank you
    Your Health Encyclopedia
    Medical and health consumer information resources containing comprehensive and unbiased information in patient-friendly language

  6. #6
    hi,

    if you need a script to run at regular intervals, then you have to have access to cron.

    Brandon

  7. #7
    If u are using Cpanel, just use the cron feature and set your frequency and set the task to like |/home/username/path/to/yourscript.php
    Yes, you need that | in front.
    OCEAN HOST
    www.ocean-host.com
    Get Online. Reach Worldwide.
    Check our uptime

  8. #8
    If u are using Cpanel, just use the cron feature and set your frequency and set the task to like |/home/username/path/to/yourscript.php
    Yes, you need that | in front.
    i guess, u don't understand what i need.

    i have 2 domains on different hosts

    1-st domain where is located script haven't cron access
    2-nd domain in on cpanel hosting.

    i need to put this lines on my second domain to run script on my first domain.
    that's why i cann't put path [/home/username/path/].
    Your Health Encyclopedia
    Medical and health consumer information resources containing comprehensive and unbiased information in patient-friendly language

  9. #9
    if you need a script to run at regular intervals, then you have to have access to cron.
    it's not a problem, if i can run script on my first domain, from the second domain "cron".
    Your Health Encyclopedia
    Medical and health consumer information resources containing comprehensive and unbiased information in patient-friendly language

  10. #10
    You can code a php to run the 1st domain's php and put it on your 2nd's cron
    OCEAN HOST
    www.ocean-host.com
    Get Online. Reach Worldwide.
    Check our uptime

  11. #11
    You can code a php to run the 1st domain's php and put it on your 2nd's cron
    yes, i know , that i can, but i don't know what to write instead

    php /path/to/yourscript.php


    php /http://www.firstdomain.com/to/yourscript.php ?
    Your Health Encyclopedia
    Medical and health consumer information resources containing comprehensive and unbiased information in patient-friendly language

  12. #12
    Try wget, and give it the URL to the other script. It must be publicly accessible though.

  13. #13
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,099
    If you have lynx installed on your system, your cron will simply be :

    lynx --dump http://www.yourotherdomain.com/script.php > /dev/null
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

  14. #14
    thank you fyrestrtr

    yes. both hosts have lynx installed

    pls, correct me, if i'm wrong

    is it right code that i must enter in "Command to run: " field

    Code:
    lynx --dump http://www.yourotherdomain.com/script.php > /dev/null
    Your Health Encyclopedia
    Medical and health consumer information resources containing comprehensive and unbiased information in patient-friendly language

Posting Permissions

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