Menu
  • HOME
  • TAGS

Run Cron only if the script is not running

php,file,cron,alive

You can use database fields to control scraping intervals and assign scraping status (like 'active', 'done' etc.), you can as well use a lock file, something like that: <pre> // define name for lock $lock_name = "/location/on/server/imworking.loc"; // exit script if lock file exists if( is_file( $lock_name ) ) exit...