Automation - novostrim/watcher4site GitHub Wiki

Watcher4site should give you an easy way to monitor changes on your site, and not force you to constantly enter the system and manually run a check. To automatically run checks at the necessary regularity you will need to use cron. Generally, most service plans include it. You can get more information about adding a script to cron from your hoster.

Cron run script

The script you will need to add for regular launches in cron is indicated here. It is entered after the run php command. Your full cron command could look like this:

/usr/bin/php-cgi /home/login/public_html/watcher/api/cron.php >/dev/null 2>&1

/usr/local/bin/php /www/login/www/watcher/api/cron.php

It should be noted that the cron.php script executes a check with the current parameters in the control panel. Let's look at how cron.php can notify you of discovery of changes. Notifications will not be sent in repeat checks if no new changes are found. For example, if you have a check every two hours, you will receive only one notification of discovery of a breach in the six hours after the breach. After receiving the notification, you just need to enter the Report and will immediately see what changes occurred on your site. It is absolutely necessary to test cron script launching and receipt of notifications before considering watcher4site settings complete.

Email

You can enter one or several email addresses to receive messages, separated by commas.

Text for email notifications

Enter the text to be sent to the email address designated above if changes are discovered here.

URL address

You may want to send yourself notifications in a different way, for example via text messages. In that case, enter the link (URL) to be used here. For example:

http://www.[yoursite].com/php/sendsms.php

http://www.[yoursite].com/notify/?watcher=1

PHP script

This does nearly the same thing as the URL field, but here the script must be on your site.

/php/sendsms/php