GoogleUpdate.exe on a Schedule Overview

Background

As mentioned in the release announcement, client software products have unique challenges, with one of the important challenges being keeping the product up to date. Deploying critical security fixes in a timely and effective manner is one key way that GoogleUpdate.exe, code name Omaha, helps keep users secure. Another benefit is that cool new features get deployed and adopted quickly. 

Until now, Google Update would always run in the background, functioning primarily as a reliable scheduler performing update checks at periodic time intervals. The Google Update Core was primarily responsible for runnning the internal task scheduler. A secondary purpose of the Core was to handle crashes. The Google Update Update Worker did the actual update check, and updated any applications that had updates on the Omaha server.

Google Update now uses the Windows Task Scheduler to only run at periodic intervals. At the same time, the design is careful to ensure that automatic updates work just as reliably, and that users are just as safe and secure as before.

Requirements

  The list of requirements includes:
  1. Only run Google Update when needed and limit the amount of time it runs.
  2. For handling crashes, GoogleCrashHandler.exe will be running and ready at the point where the Google application process starts. This is to allow for early crashes in an application to be caught. In addition, the application does not incur a startup delay waiting for the crash handler to start.

Design

A quick note on terminology: Google Update installs itself for the entire "Machine" when it is asked to install an application for all users. This is known as the "Machine instance" or the "Machine Case". In cases where Google Update installs a per-user application and itself as "User", this is known as the "User instance" or the "User case". 


With the new design, the Google Update Core, as well as the Update Worker, will primarily run as tasks scheduled by the Windows Task Scheduler. 

The Core scheduled task will have a trigger to run at logon only for the machine case, and a trigger to run at daily intervals for both user and machine. 

The Update Worker task will be installed for both the user and machine cases. It will run at a fixed interval of one hour. 

The existing mechanisms to launch the Core using the System Service for machine and the Run key for user are also being retained in case the Task Scheduler does not work as intended. 

 

 

 

 

 

 

 

 

 

When the Core runs, it will do the following:


When the Update Worker runs it will do the following:

 


Some notable changes:
  • The idle trigger is being eliminated for the scheduled tasks, because it offers limited robustness benefits, and has issues with the Core running too frequently.
  • There will now be two scheduled tasks installed for Omaha, one for the Core, and another for the Update Worker.
    • The Core scheduled task will have two triggers for machine, and one for user: The common trigger will run the Core task once every 24 hours. The additional trigger for machine will run the task at logon; this is a secondary kickoff mechanism for the machine case. Windows does not allow a "run only when logged on" task to have a logon trigger, hence Omaha does not have that trigger for the user case. 
    • The Core task will have the default name of "GoogleUpdateTask[User|Machine]Core", or if that name is already taken, a name of the form "GoogleUpdateTask[User|Machine]{uniquestring}Core". 
    • If the Core task name is not the default name, the unique name will be stored in the "Google\Update" registry under the "gupdate_task_name_c" named value.
    • The Update Worker task will have one trigger: run at fixed intervals of approximately one hour.
    • The Update Worker task will have the default name of "GoogleUpdateTask[User|Machine]UA", or if that name already exists, a name of the form "GoogleUpdateTask[User|Machine]{uniquestring}UA".
    • If the Update Worker task name is not the default name, the unique name will be stored in the "Google\Update" registry under the "gupdate_task_name_ua" named value.
  • When the Core runs, it will check for existence of the UA scheduled task. It does not care if the Core task is installed or not. If the UA task is not installed, the Core will run continously.

Addressing issues with using the Windows Task Scheduler