CRON paths

Discussion in 'H-Sphere Shared Hosting' started by GreggIrwin, Jul 27, 2010.

  1. GreggIrwin

    GreggIrwin Guppy

    Hi there,

    We recently moved to JoDoHost, and I need to set up our cron jobs now. I'm getting a "No such file or directory" email, so I think I just have a simple path error. Before just hacking things, I thought I would ask what JoDo recommends or prefers.

    I tried this first:


    Which resolves to this:

    /hsphere/local/home/<hosting user>/<domain>.com/cgi/<script>

    Then I tried a relative path, rather than absolute:


    I would also like to confirm that this is the correct PHP path to use with cron jobs:

    /hsphere/shared/php5/bin/php-cli /hsphere/shared/php5/bin/php-cli

    Then the answer to the above path question should apply as well. e.g.:

    /hsphere/shared/php5/bin/php-cli /hsphere/shared/php5/bin/php-cli $HOME/<domain>.com/<path/script>.php


    P.S. I have tested the scripts manually via a browser, so I have confirmed that they work there.
  2. tanmaya

    tanmaya APAC Operations Staff Member

    /hsphere/shared/php5/bin/php-cli -q /hsphere/local/home/<your-FTP-User>/<path-to-script>

    /hsphere/shared/php5/bin/php-cli -q /hsphere/local/home/myuser/
  3. GreggIrwin

    GreggIrwin Guppy

    Thanks Tanmaya,

    It looks like I have the pathing correct then. Maybe I'll open a support ticket. It may be a permissions issue as a couple PHPs are giving me a 500 result.
  4. GreggIrwin

    GreggIrwin Guppy

    My basic cron jobs seem to be working now, with the original $HOME based path format. I don't know what would have caused the "No such file or directory" error before, but it works now.

    I'm getting "Could not open input file" with PHP scripts, though the path on the files looks correct. I've tried both with and without -q, and will investigate further.
  5. GreggIrwin

    GreggIrwin Guppy

    Next step, it was a typo in my path to the PHP files. <sigh> Let me request that on the crontab page that the command field be made as wide as possible. All the other columns can be narrower IMO, making even more room for it.

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services