Friday 2 August 2019

How to set cron job in heroku in PHP | Codeigniter

Step 1:  Install Heroku Scheduler add-ons from Heroku.


Step 2: Goto Heroku Scheduler page and add Job, set time interval and add command " php /app/index.php orderupdate crontset jaydip "
  1. php = server language
  2. /app/index.php = Path of the project root index.php
  3. orderupdate = name of controller
  4. crontset = name of function
  5. jaydip = variable name which you want to get into crontset function
Step 3: open Orderupdate.php controller

public crontset function($name){

echo $name;

}

No comments:

Post a Comment