Jump to content

Recommended Posts

Posted

I have a PHP script I need to run through Cron.

 

I've tried several different things, but I always get an error message sent to my cron E-Mail address

 

I know for PEARL you need to put the path to PEARL at the top of the file. Do you need to do something like that in PHP?

 

 

 

 

Many Thanks,

Dman8568

Posted

Ok, I've tried that, and it didn't work.

 

Here is the top of the script I need to run through cron:

>#!/usr/bin/php
<?php
...
...
?>

 

Here is the Error Message I'm getting in my Cron Inbox:

/bin/sh: /home/wvtroop/system/cron/clean_db.php: /usr/bin/php

: bad interpreter: No such file or directory

 

 

Any Ideas?

 

 

Many Thanks,

Dman8568

Posted (edited)

So I would put into the cron panel of CPanel

>/usr/bin/php -q /home/wvtroop/system/cron/sessions_clean.php

In order to run the program at "/home/wvtroop/system/cron/sessions_clean.php"

 

Is this right?

Edited by Dman8568
Posted

Yes I have a folder below the Public_html folder called "system"

 

I have my dir tree set up like this:

>/wvtroop/
 public_html/
 system/
cron/
db/
includes/
  sub-routines/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...