user455982
user455982

Reputation:

How to solve this cron job error directory not found?

I have make one cron job as below

<?php 
echo "HI";
?>

When i ran it using cron job it give me error "?php directory not found"

Please help me regarding this.

Thanks in advance.

Kanji

Upvotes: 1

Views: 352

Answers (1)

Adrian Smith
Adrian Smith

Reputation: 17553

How do you run it as a cron job? Either you need to run it like

php my-program.php

Or you need to run it directly (without php) and put the following at the top:

#!php

In the above examples you need to replace php by the full path to your php instance, which you can find my typing the following on the shell:

which php

Upvotes: 3

Related Questions