as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support

Step 8: Register your Task with the System

Tell the system about your task’s entry points so they are executed. Create or update a task.js file in the same path where the package.json is located with the following content.

Copied to clipboard.

import { HeadlessEntryPointRegistry } from "@amazon-devices/headless-task-manager";

import { default as doOnInstallOrUpdateTask } from "./src/OnInstallOrUpdateTask"
import { default as doEpgSyncTask } from "./src/EpgSyncTask"

// Register your EPG Sync function by setting the value of 'doTask'.
HeadlessEntryPointRegistry.registerHeadlessEntryPoint("<packageId>.epgSyncTask::doTask",
    () => doEpgSyncTask);

// If you created a new task in Step 6,register it here as well:
HeadlessEntryPointRegistry.registerHeadlessEntryPoint("<packageId>.onInstallOrUpdateTask::doTask",
    () => doOnInstallOrUpdateTask);

Copied to clipboard.

HeadlessEntryPointRegistry.registerHeadlessEntryPoint("<packageId>.epgSyncTask::doTask",
    () => doEpgSyncTask);

Last updated: Sep 30, 2025