bjs Posted June 21, 2004 Posted June 21, 2004 I'm trying to set up my first cron job using the 'Standard' option in cpanel. I've set up a php script that will delete expired records from a database. In the command field, I've entered this path to the php script I want to run: /home/mycpanelname/cronjobs/flush_jobs.php As you can see, I've put the php script in a folder called cronjobs outside of my public_html folder. I'm going to adjust the settings so that this script run every night at midnight, but for now I'm having it run every minute for testing purposes. The problem is that when the cron job runs, I get an email with this error: /bin/sh: line 1: /home/mycpanelname/cronjobs/flush_jobs.php: Permission denied Thanks, Quote
MikeJ Posted June 21, 2004 Posted June 21, 2004 Make sure your php script has execute permissions set and make sure you have this as the very first line of your php script >#!/usr/local/bin/php Or you can enter the cron entry like this: >/usr/local/bin/php /home/mycpanelname/cronjobs/flush_jobs.php Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.