Skip to main content

Background jobs

Aivie does part of its work on a schedule, without anyone pressing a button. The jobs run inside your site and need no setup: there is no extra user to create and no key to add. This page explains what they do and the one case in which you switch a job off yourself: a copy of a live site.

What the jobs do​

Aivie runs its jobs through Umbraco.Community.JobsJobsJobs, which is installed with the package.

  • Monthly ideas. By default on the first of the month, the ideas job generates the ideas for the month from your active idea groups and gives them publication dates. It does the same as the Auto generate button. See Your first ideas.
  • Datasource crawl. Every night, Aivie reads the websites on the Datasources screen again. See Datasources.
  • AI connection check. Every morning, Aivie makes a short test call to the AI connection, so that the status on the subscription screen stays current.

Next to these jobs, a background service renews the licence at the licence server. Scheduled jobs lists every job with its schedule and how to change it.

Every job checks the licence before it starts. When the licence does not let Aivie create anything, for example because it has expired, the job does nothing and writes a warning to the log. See Licence statuses.

During a trial the scheduled jobs do not run; use Auto generate instead. A job has no web request, so Aivie cannot tell that the site runs on a local host. See Background jobs not running.

Staging and test copies​

The ideas job runs wherever the licence allows it. That includes a staging or acceptance copy of a live site with a cloned database and the same licence. On such a copy the job generates pages too, and they count against the same monthly allowance.

Switch the job off on every copy that is not the live site:

  1. Open Configuration → Setup, and choose the tab Settings.
  2. In the group Idea generator, switch off Monthly idea job on.
  3. Press Save.

You can also set Aivie:Ideas:JobEnabled to false in the configuration of the copy, for example in an environment variable Aivie__Ideas__JobEnabled. A value saved on the Settings tab is stored in the database and wins over your configuration. A cloned database therefore brings along whatever was saved on the live site, so check the Settings tab of the copy after each clone. See configuration keys.

With the job off, each scheduled run only writes a warning to the log, and no ideas are made. The Auto generate button keeps working, because someone presses it on purpose.

Check the ideas job​

After a scheduled run, open the Umbraco log. At the Information level a successful run writes a line that starts with IdeaGeneratorJob done:, followed by the number of ideas made, or a line saying that no cluster is active this month. A run that could not make anything writes a warning with the reason, for example that no ideas are left this month.

If your site only logs warnings and errors, a successful run leaves no line at all, so an empty log does not prove anything there.

When the site shuts down during a run, the run stops and writes a warning. The ideas made until then stay in the idea list, and the next run continues with what is left of the monthly allowance.

If the job does not run at all, see Background jobs not running.