Closed Bug 1687783 Opened 3 years ago Closed 3 years ago

macOS OS-level task scheduler component

Categories

(Toolkit :: Application Update, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Bug 1676296 introduced a TaskScheduler.jsm abstraction around scheduling OS-level tasks, and an implementation for Windows based on Task Scheduler. This ticket tracks adding an implementation for macOS based on launchd.

One thing worth noting here. At this time, there's no macOS installer and/or uninstaller. That means we have no clear point to run code to clean up old scheduled tasks. However, the clever folks at Steam use the WatchPaths launchd.plist key to do some additional clean up when their App is deleted, and we can do similar.

At the same time, remove the global define, which isn't necessary and
triggers some rebuilds. Nothing is using MOZ_UPDATE_AGENT right now
so it's safe to enable more broadly, and it will be used to gate new
background update work.

Assignee: nobody → nalexander
Status: NEW → ASSIGNED

The bundle ID will be used to namespace OS-level tasks registered with
launchd on macOS.

Depends on D102786

As written, this will work with the synchronous Windows implementation
and the forthcoming asynchronous macOS implementation. But that's a
recipe for confusion, so let's be explicit and make this API async.

Depends on D102787

Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6458260d4e48
Part 1: Enable MOZ_UPDATE_AGENT by default on macOS and Windows. r=firefox-build-system-reviewers,mhentges
https://hg.mozilla.org/integration/autoland/rev/545f379b915b
Part 2: Expose MOZ_MACBUNDLE_ID in AppConstants.jsm. r=firefox-build-system-reviewers,mhentges
https://hg.mozilla.org/integration/autoland/rev/b9ac8c1fd90f
Part 3: Make TaskScheduler API explicitly async. r=agashlin
https://hg.mozilla.org/integration/autoland/rev/194e31587e6c
Part 4: Implement TaskScheduler on macOS backed by launchd. r=agashlin,spohl
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/17e263e7f465
Part 1: Enable MOZ_UPDATE_AGENT by default on macOS and Windows. r=firefox-build-system-reviewers,mhentges
https://hg.mozilla.org/integration/autoland/rev/f4483f7da5bb
Part 2: Expose MOZ_MACBUNDLE_ID in AppConstants.jsm. r=firefox-build-system-reviewers,mhentges
https://hg.mozilla.org/integration/autoland/rev/a391f4f760fb
Part 3: Make TaskScheduler API explicitly async. r=agashlin
https://hg.mozilla.org/integration/autoland/rev/4c60dddf4f8c
Part 4: Implement TaskScheduler on macOS backed by launchd. r=agashlin,spohl

Clearing NI since I have relanded this.

Flags: needinfo?(nalexander)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: