Site Factory

Scheduled jobs in Site Factory

Important

The scheduled jobs feature for Site Factory enables you to add one-time, complex data processing jobs to be executed at a single, specific time in the future. If the job must be performed multiple times, you should instead use cron jobs scheduled through the Site Factory user interface.

Scheduled jobs aren’t executed through HTTP web requests. Unlike cron jobs, you can review the outcome and historical performance data for scheduled jobs in the Site Factory Management Console.

Reviewing scheduled job history

  1. Sign in to the Site Factory Management Console using an account with the platform admin role.

  2. In the admin menu, click Administration, and then click the Scheduled jobs history link.

    Site Factory displays the Recent Job History, which includes an overview of the scheduled jobs performed in recent days, and an Archived Job History of historical data:

    • Date (UTC): The day, month, and year the scheduled job was performed.

    • Total jobs executed: The total number of jobs performed on this day.

    • Total failed jobs: The total number, and percentage, of jobs that failed on this day.

    • Total delayed jobs: The total number, and percentage, of jobs that failed to begin execution within the defined acceptable latency period.

    • View jobs: A link to view a summary of all jobs performed on this day.

To display a detailed listing of scheduled jobs completed for a day, and access details about an individual job, click the View jobs link for your desired day.

Reviewing jobs performed in a single day

After identifying a calendar day of jobs you want to view, the Site Factory Management Console displays a table of all jobs performed that day:

  • Domain name: The domain name this job was performed for. To view a list of all recent jobs for this domain, click the domain name.

  • ID: The numeric ID for this job. To view detailed information about this job’s performance and outcome, click this link.

  • Status: An image displaying whether the scheduled job ended in success or failure.

  • Scheduled time (UTC): The time, in UTC, for when this job was scheduled.

  • Start time (UTC): The time, in UTC, for when this job began executing.

  • Latency (ms): The delay, in milliseconds, in the Site Factory Management Console. For more information, see Latency in scheduled jobs.

  • Exit code: Whether this job ended in success or failure.

  • Run time (ms): The time, in milliseconds, needed to complete this job. To obtain the time in seconds, divide this number by 1000.

Reviewing detailed information about a scheduled job

When reviewing the list of jobs performed on a calendar day, you can view detailed information about the performance and outcome of a specific job. The Site Factory displays the overview information displayed on the per-day list of scheduled jobs and the following additional detail about the job in the Property column:

  • Command: The command executed by this scheduled job.

  • Retries: The number of times the scheduled job was retried, if any.

  • stdout: The ‘standard output’ of the command.

  • stderr: The ‘standard error’ message, containing error messages or diagnostic information.

  • Exit code: The numeric code returned by this process. 0 indicates success.

Latency in scheduled jobs

The scheduled jobs feature defines a latency threshold which determines if the job’s start time should be counted as delayed. To request an increase or decrease in the default latency threshold of 15 seconds, contact Acquia support.

Deleting scheduled jobs for a website

You cannot delete an individual scheduled job, but you can remove all scheduled jobs for a domain by SSHing into your environment and issuing the command ./sj rm [domain], replacing [domain] with the website’s domain name.

Important

Site Factory immediately removes all scheduled jobs for the domain you specify. This action cannot be undone.

Scheduled jobs and code deployments

You do not need to disable scheduled jobs when performing code deployments. Scheduled jobs will always execute against your production website, regardless of whether it is currently hosted on the live or update environment.

Site Factory pauses scheduled jobs before moving websites from the live environment to the update environment, to prevent data inconsistencies. The scheduled jobs are re-enabled on the update environment, and remain enabled on the website until it is placed into maintenance mode for updating. When the website is taken out of maintenance mode, Site Factory will re-enable scheduled jobs for this website on the live environment.

Note

If the scheduled jobs back end requires an update as part of an Site Factory platform release, Site Factory will pause scheduled jobs to allow the service to update.

Scheduled jobs and website duplication tasks

When duplicating a website, as either a clean copy or a full website clone, Site Factory duplicates scheduled jobs from the original website, and updates them to reflect the domain name for the new website.

Deleting a website or domain with scheduled jobs

Scheduled jobs are tied to a domain name. If you delete the domain name associated with a scheduled job, Site Factory attaches the scheduled jobs to another domain name associated with the same website.

If, instead of deleting a domain name, you delete the entire website, all scheduled jobs associated with that website are immediately deleted.