codeigniter - Cron Job on a function or url PHP -


i want run cron job in such way :

  1. function or url call every hour custom time when needed.[ex. 9:45,10:45,11:45 etc.]
  2. i need time variable[ex. 9:45 am] available in function when function or url called .
  3. i use time query database,so necessary

so far have created function run dont know how run it. searched solution there many similar questions not related this.

**url example :**  

http://abcd.com/shifatwebservice/getalldata

**function example :**  
function getalldata_get(){     //time cron job     //run query using time      } 

if need call cron job externally, can use 3rd party job scheduler service(https://cronless.com/).

if there no need call external locations, have use task scheduler service available on operating system.

on windows: task scheduler ( ref: task scheduler )
on linux: cron daemon ( ref: cron daemon )


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -