Page tree
Skip to end of metadata
Go to start of metadata

 

On This Page:

Revive Adserver requires that a "maintenance" process be run on a regular basis.

The Revive Adserver maintenance process summarises the statistics from the previous hour so that they can be displayed, activates and deactivates campaigns as required, recalculates banner delivery priorities and sends email reports.

 



Maintenance Options

The Revive Adserver maintenance process can be triggered in two different ways:

  • By manually configuring a scheduled task on your server to run the maintenance script (i.e. scheduled maintenance); or
  • Using Revive Adserver's built-in automatic maintenance system.

Although Revive Adserver will continue to operate and deliver banners if the maintenance script is not executed, some or all of the following issues may occur:

  • Inactive campaigns with a start date are not be activated when the start date is reached;
  • Active campaigns with an end date are not be deactivated when the end date is reached;
  • Campaigns with a maximum number of impressions (either daily or in total) are not deactivated when (or soon after) the limit is reached;
  • Newly created contract campaigns are not delivering any impressions;
  • Existing contract campaigns continue to have the same priority values and are not updated to reflect changing delivery values; and
  • Statistics are not updated in the user interface.

 

If you are experiencing any of the above issues, check that the maintenance script is running correctly. You can do this in the Revive Adserver user interface as an administrator user by going to Configuration > Maintenance.

Built-in automatic maintenance

By default, Revive Adserver uses the built-in automatic maintenance system, which triggers the maintenance script via banner delivery. This attempts to ensures that maintenance is always run, even if Revive Adserver has been installed without configuring that maintenance be run via a scheduled task runner. However, there are a number of disadvantages to leaving the built-in automatic maintenance as the mechanism by which the maintenance script is triggered: 

  • Revive Adserver will wait for five minutes beyond the "ideal" time to start running the maintenance script, to allow time for any manually scheduled maintenance to complete. As a result, user interface statistic updates, campaign activation/deactivation, banner prioritisation and emailing of reports will be slightly delayed compared with manually scheduled running of maintenance;
  • As the maintenance script is triggered by banner delivery, maintenance may fail to be run if you have periods where there is no banner delivery happening;
  • The impression logging script is slightly slower, as it needs to check if maintenance needs to be run;
  • The only way to detect an issue with the maintenance script failing to complete is to notice one or more of the issues associated with maintenance failing to run correctly and/or manually checking the log files. With scheduled maintenance, depending on your task running system, it may be possible to have the task runner alert you in the event of the script failing to run correctly.

As a result, it is recommended that you use scheduled maintenance wherever possible with Revive Adserver.

Automatic maintenance waits for five minutes after the scheduled maintenance task was due to run. This delay ensures that any manually-scheduled maintenance has time to complete. With automatic maintenance you can:

  • enable and disable automatic maintenance on the Global Settings > Maintenance page.
  • view the log of maintenance runs on the My Account > User Log page.

Scheduled maintenance

Scheduling the running of the maintenance script via a task running system is considered more reliable than relying on the built-in automatic maintenance. To configure scheduled maintenance, firstly disable automatic maintenance by, as an administrator user, going to Configuration > Global Settings > Maintenance Settings and disabling automatic maintenance.

Once this is done, use a task running system (e.g. cron on Unix, Linux, Mac, etc.) to schedule the running of the maintenance script. See below for more details.

Scheduling maintenance on Unix, Linux, Mac, etc.
  1. Ensure that your server supports the PHP CLI (command line interface).
  2. Add the following to your server's crontab:
 1 * * * * /path/to/php /path/to/revive_server/scripts/maintenance/maintenance.php www.example.com

Ensure that the user that the cronjob is configured to run as matches the user that owns the Revive Adserver installation, to prevent a different (e.g. root) user from creating cache files etc. which then lock out the installation owner (i.e. the web site) from changing them later on.

 

If you're unable to set up a local cron job to do this (or you are unable to use the command line version of PHP), you can achieve the same effect by calling the maintenance script via the web, assuming that you:

  1. have access, or can obtain access, to a service which can call a URL at a recurring, pre-determined interval; and
  2. you have installed Revive Adserver so that http://www.example.com/path/to/revive_server/maintenance/maintenance.php is accessible from the web.

If those assumptions are true, then simply configure the appropriate URL to be called shortly after the beginning of each hour, e.g. using curl:

Calling maintenance with curl
1 * * * * curl -s -o /dev/null http://www.example.com/path/to/revive_server/maintenance/maintenance.php

 

or wget:

Calling maintenance with wget
1 * * * * wget -q -o /dev/null http://www.example.com/path/to/revive_server/maintenance/maintenance.php
  • No labels

1 Comment

  1. If you have any problem with the cron job settings, you may try https://www.easycron.com.