Automating the scans (CRON jobs)

[Tip]Tip

Consult the Automatic Scanning page of the plugin for detailed information, tailored to your site, without having to read this documentation page.

When you install Admin Tools, it copied a file named admintools-filescanner.php into your site's wp-content/plugins/admintoolswp/cli directory. When you run it, it will execute a new scan. If you have access to the command-line version of PHP (most hosts do), you can use that script to schedule your file scans.

In order to schedule a file scan, you will have to use the following command line to your host's CRON interface:

/usr/local/bin/php /home/USER/webroot/wp-content/plugins/admintoolswp/app/cli/admintools-filescanner.php

where /usr/local/bin/php is the path to your PHP CLI executable and /home/USER/webroot is the absolute path to your web site's root. You can get this information from your host.

Special considerations:

  • Most hosts do not impose a time limit on scripts running from the command-line. If your host does and the limit is less than the required time to scan your site, the scan will fail.

  • This script is not meant to run from a web interface. If your host only provides access to the CGI or FastCGI PHP binaries, this script will not work with them. The solution to this issue is tied to the time constraint above.

  • Some servers do not fully support this scan method. The usual symptoms will be a scan which starts but is intermittently or consistently aborted in mid-process without any further error messages and no indication of something going wrong. In such a case, trying running the scan from the back-end of your site will work properly. If you witness similar symptoms, you can most likely not automate your site's scan.