Skip to content

Instantly share code, notes, and snippets.

@dmolsen
Created May 21, 2012 14:45
Show Gist options
  • Select an option

  • Save dmolsen/2762715 to your computer and use it in GitHub Desktop.

Select an option

Save dmolsen/2762715 to your computer and use it in GitHub Desktop.
Cron jobs to be used with ua-parser-php
// any of the following can be used as the basis for your cron job.
// you shouldn't have to grab the regexes.yaml file more than once a day.
// the following examples will run at midnight each day
// update your regexes.yaml file with the following
0 0 * * * php /path/to/UAParser.php -get
// use the -silent flag to turn off status updates when grabbing latest regexes.yaml
0 0 * * * php /path/to/UAParser.php -get -silent
// use the -nobackups flag to avoid creating back-ups when grabbing latest regexes.yaml
0 0 * * * php /path/to/UAParser.php -get -nobackup
// mix both flags
0 0 * * * php /path/to/UAParser.php -get -silent -nobackup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment