cron - Trigger php file at regular time intervals - without cronjobs? -


ok so, have web server , site uses php. question how trigger php files run @ regular intervals (say every 5 minutes example)?

unfortunately web hosting provider not seem support cronjobs, surely there must alternative people without cron access?

depending on how loosely might want enforce 5 minutes, , if have regular traffic site (at least 1 request once minute), can consider:

  • on each request check database when job ran last time
  • if more 5 minutes ago, run job , update database

the more script run, more accurate 5 minutes be. increase times script run:

  • see if there file included on every request, config.php.
  • or maybe have routing, eg requests go through index.php

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -