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.
使用Kohana Task或:
1 * * * * wget http://example.com/controller/api/firebasenotification/dateNotification
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.