Results 1 to 5 of 5

Thread: crontab error

  1. #1
    Join Date
    Aug 2005
    Location
    England
    Posts
    58

    crontab error

    i've added this entry into my crontab
    5 * * * * /home/mynamehere/public_html/myscript.php >/dev/null 2>&1
    have got an error by email with this:
    /bin/sh: /home/mynamehere/public_html/myscript.php: Permission denied
    the scripts current permission is 644, do i need to change that to 744 in order for crontab to work?

  2. #2
    How about

    instead of:

    /home/mynamehere/public_html/myscript.php >/dev/null 2>&1

    put:

    php /home/mynamehere/public_html/myscript.php >/dev/null 2>&1


    and see how that goes.

  3. #3
    Try logging into the server as the user who needs to add the cron. From shell run

    php -q /home/mynamehere/public_html/myscript.php >/dev/null 2>&1

    Make sure it is running fine. If yes add it to cron. In your previous attempt you were trying to run the php script using shell.
    SupportPRO.com -Transparent Technical Support for Webhosts
    Let the PROs handle your support

  4. #4
    Join Date
    Aug 2005
    Location
    England
    Posts
    58
    thanks alot, the script is now running on the time i set it to

  5. #5
    Nice to hear
    SupportPRO.com -Transparent Technical Support for Webhosts
    Let the PROs handle your support

Posting Permissions

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