Unable to create scheduled event in Freshworks serverless custom app – “The app has not registered an onScheduledEvent”

Hi Team,

I’m currently facing an issue while trying to create a scheduled event in a Freshworks serverless custom app.

I am using $schedule.create() inside my app, but when I try to create the schedule, I get the following error:

{
  status: 400,
  message: 'The app has not registered an onScheduledEvent'
}

Below is the code I am using to create the schedule:

await $schedule.create({
  name: `waiting_on_customer__${conversation_id}`.slice(0, 30),
  data: {
    conversation_id,
    type: "alive_scenario",
    time: now,
    user_id,
  },
  schedule_at: new Date(
    Date.now() + Number(resolved_delay) * 60 * 1000,
  ).toISOString(),
});

My manifest.json configuration is as follows:

{
  "platform-version": "3.0",
  "modules": {
    "common": {
      "events": {
        "onScheduledEvent": {
          "handler": "onScheduledEventHandler"
        }
      },
      "requests": {
        "postMessage": {},
        "updateConversation": {},
        "getConversation": {},
        "getMessage": {}
      }
    },
    "chat_conversation": {
      "events": {
        "onConversationUpdate": {
          "handler": "onConversationUpdateHandler"
        }
      }
    }
  },
  "engines": {
    "node": "24.11.1",
    "fdk": "10.0.0"
  }
}

I have already added onScheduledEvent in the common.events section, but the platform still returns the above error while creating the schedule.

Could you please help me understand:

  1. Whether onScheduledEvent is supported in a serverless custom app under this module setup

  2. If there is any issue with my manifest.json configuration

  3. Whether I need any additional setup for the scheduled event handler to be registered properly

  4. If Node.js 24.11.1 or FDK 10.0.0 could be causing any compatibility issue

Any guidance would be greatly appreciated.

Thanks in advance.

Guys,

I am seeing the same error.

  "engines": {
    "node": "24.11.0",
    "fdk": "10.1.2"
  }

The “app has not registered an onScheduledEvent” error occurs when the event listener is not properly configured in your server.js file. To resolve this, ensure you register onScheduledEventHandler in the exports block and define the corresponding event in your manifest.json.

1. Update server.js

Ensure your callback function is defined in the exports object exactly as shown below:

exports = {
  onScheduledEventHandler: function(payload) {
    console.log("Logging arguments: " + JSON.stringify(payload));
    
    // Add your app logic here
  }
};

2. Update manifest.json

Make sure onScheduledEvent is explicitly declared in the events block of your manifest.json:

"events": [
  {
    "name": "onScheduledEvent",
    "handler": "onScheduledEventHandler"
  }
]

Ref: The app has not registered an onScheduledEvent - #2 by Kithiyon

Hi Himanshu,

The manifest example you have given is a different format to the documentation.

I tried this and it generates platform error when you try fdk run.

My manifest code is exactly as per the documentation and I get the original error.

My server.js file subscribes to multiple events so I use the following pattern which has always worked:

,
exports = {
onAppInstallHandler: function (payload) { some code here.....},
onAppUninstallHandler: function (payload){ some code here....},
onScheduledEventHandler: function (payload) { some code here...}
}

Thanks for calling it out @RobAtOpinyin
My previous manifest sample used the wrong format for Platform 3.0.
For Platform 3.0, events must be declared under modules.common.events as an object, not an array.

Use this pattern:

{
  "platform-version": "3.0",
  "modules": {
    "common": {
      "events": {
        "onScheduledEvent": {
          "handler": "onScheduledEventHandler"
        },
        "onAppInstall": {
          "handler": "onAppInstallHandler"
        },
        "onAppUninstall": {
          "handler": "onAppUninstallHandler"
        }
      }
    },
    "service_ticket": {}
  },
  "engines": {
    "node": "24.11.0",
    "fdk": "10.1.2"
  }
}

And your multi-handler server.js pattern is valid:

exports = {
  onAppInstallHandler: function(payload) { /* ... */ },
  onAppUninstallHandler: function(payload) { /* ... */ },
  onScheduledEventHandler: function(payload) { /* ... */ }
};

Key checks if the error still appears:

  1. onScheduledEvent is under modules.common.events (not product module).

  2. Handler name matches exactly (case-sensitive).

  3. server/server.js has no syntax errors.

  4. fdk validate passes before fdk run.

Thanks again for flagging the format mismatch.

Also, in scheduled/product event handlers, it is recommended to call renderData() at the end (and in catch paths) so the runtime gets an explicit completion signal and avoids timeout-style behavior.

Example:

exports = {
  onScheduledEventHandler: async function(payload) {
    try {
      // logic
      renderData();
    } catch (e) {
      console.error(e.message);
      renderData();
    }
  }
};

Hi Himanshu,

I can confirm that all the checks you listed are OK.

I also added renderData() to my onScheduleEventHandler but still get the error.

However, I think we maybe looking at the wrong place as I get this error when I call $schedule.create() function. I have tried sending the using the exact same payload as in the documentation and I still get the same error, so I am confident its not an error here. My code worked perfectly with FDK2.7. Has anything changed here?

Hey @RobAtOpinyin, let me check this internally with the team

Hi Himanshu,

Any update on this. Its holding up testing of an app update we need to get in for review.

Hi @RobAtOpinyin,

Here’s a working sample app for schedule events. Could you please try this and let me know if you face any challenges?

scheduleEvents.zip (3.7 KB)

Best,
Himanshu

Hi Himanshu,

The zip you provided was a packed app so we couldn’t look at the code, but we have created a simple test app that replicates the error.

BR,

Rob
Scheduler Bug.zip (70.1 KB)

Hi @RobAtOpinyin, thanks for the zip, let us have a look and come back to you with an update

@Himanshu_Sharma is there any update on this. Its blocking us submitting app updates for FDK 3.

Thanks

Rob

Hi @RobAtOpinyin,

Let me share an update with you on this by EOD

Hi @RobAtOpinyin / @Santhosh_Kumar,

Could you please update FDK to 10.1.5 version and retry your individual apps? The new version should fix the issue.

Best,
Himanshu

Hi Himanshu,

Thanks for the update. I can confirm that has fixed the issue.

Best,

Rob