crontab not working in kohana freamwork

57 views Asked by At

I'm using crontab to call my function. but it is not working.

My function is working browser as well as in postman too.

====> MY FUNCTION

public function action_dateNotification() {


          $sql = "INSERT INTO testcrown(name) VALUES('nitin')";
            DB::query(Database::INSERT, $sql)->execute();
            echo "inserted";

}

below url is working in browser and postman. When we invoke this url entry get save into database.

http://www.nkg.com/index.php/api/firebasenotification/dateNotification

I have set above url in crontab -e file

1 * * * * php index.php --uri=controller/api/firebasenotification/dateNotification

My project kohana version 3.1.3.1.

1

There are 1 answers

0
bato3 On

Use Kohana Task or:

1 * * * * wget http://example.com/controller/api/firebasenotification/dateNotification