The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Permisssion denied in cronjob executing?

Discussion in 'General Discussion' started by phpmady23, May 1, 2011.

  1. phpmady23

    phpmady23 Registered

    Joined:
    May 1, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I am using cpanel, where i am want to run a php file, to delete the old records,

    i used cronjob in cpanel to do this.

    In time columns i have made : * * * * * to execute each and every minute the script..

    In the command textbox i have made: /home/server25/public_html/auto_cancel.php


    in the email box: admin_email@gmail.com


    I am getting Permission denied to my email address:
    The error report am getting is :

    /bin/sh: /home/server25/public_html/auto_cancel.php: Permission denied

    Please help me to solve this.
    Thanks,
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    php -q /home/server25/public_html/auto_cancel.php
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I am uncertain if it is advisable to set a cron job to run every minute to perform a deletion operation. Most hosting providers would not want such a cron running every minute on a machine. Once you get the cron working, I would suggest changing it to every 5 minutes or every 15 minutes instead to ensure that this does not have an adverse impact on the machine.
     
Loading...

Share This Page