Couldn't create One time Schedule

Hi folks,

I hope you are doing well!

I tried to create a one-time schedule but failed with the error { status: 400, message: ‘Schedule event could not be created’ } while this was working previously. I’m just wondering what could be the reason for this and I could found any detail on the documentation.

Can anyone help me with this?

@rajezz,
Hope you are doing good,
Do you mean the schedule is already working in the installed app and now it is not working?
if so please find the doc for more reference.

You can have a maximum of 1000 one-time schedules and 1 recurring schedule,

Hope it helps :slight_smile:

Thanks

1 Like

Hi,

I am having the same issue as @rajezz. With an app that was already in the Marketplace, trying to create a schedule using $schedule.create now results in the error:
{ status: 400, message: ‘Schedule event could not be created’ }

Previously it would create the schedule.

The data being passed to $schedule.create to create a recurring schedule looks like:
{ name: “sync”, data: { name: “sync” }, schedule_at: “2021-10-07T21:35:00.000Z”, repeat: { time_unit: “days”, frequency: 1 } }

Our app is using platform version 2.0 which is defined in manifest.json:
“platform-version”: “2.0”

I even tried updating platform version to 2.2 (and specifying the event handlers in manifest.json as required), but it still results in the same error:
{ status: 400, message: ‘Schedule event could not be created’ }

Any help would be appreciated.

Thanks

1 Like

Hi @Santhosh,

Just checking if you had any update about this.

Thanks,

Chris

1 Like

@Chris_Scaglione @rajezz

Does this occur in local simulation with fdk too? Or the error only appears in production?

2 Likes

Only in Production @Saif

Hi @Saif,

We use $schedule in an SMI that gets called from the postConfigs function in iparams.html. When testing the configuration page using http://localhost:10001/custom_configs, it is able to create the schedule without error.

We get the error when using the Marketplace app or custom app.

2 Likes

@Chris_Scaglione ,

Unfortunately, we don’t support creating schedules from the configuration page,

only SMI and request API is allowed on the Iparams page

even in SMI if you tried calling Schedule it won’t work, because you are calling SMI from Iparams

Hope it helps :slight_smile:

Thanks

Hi @Santhosh ,

We are using client.request.invoke in iparams.html to call the SMI that adds/updates/deletes the schedule.

This is an existing app that has been in the Marketplace for some time and did work in creating the schedule, but now we noticed that it fails to create the schedule.

The same error for creating the schedule does not occur when running the app locally and accessing the configuration page through http://localhost:10001/custom_configs.

Thanks

1 Like

@Chris_Scaglione,
As I said, SMI and request API is allowed on the Iparams page,
and other services are not allowed,
There is a bug in the scheduler with the local environment, we are about to fix that issue soon.

Hi @Santhosh,

We do not use $schedule directly in the iparams page. The iparams page calls client.request.invoke(‘scheduleChanged’, options). scheduleChanged function lives in server.js and it is this function that uses $schedule service.

Thanks

1 Like

@Chris_Scaglione,

As I said in my previous post,

even in SMI if you tried calling Schedule it won’t work, because you are calling SMI from Iparams

Hope it helps :slight_smile:

Thanks

@Santhosh So then this functionality changed, since this used to work? If you can’t create a schedule from the configuration page, where are you supposed to create it from?

1 Like

@Chris_Scaglione ,
As per the docs Custom Installation Page

we didn’t supported the scheduler in Iparams (configurations) page.

but you are allowed to create it from app rendering page, i.e in app page you are able to create the scheduler.

Thanks.

@Santhosh Based on the above note from the docs page, we are doing that. iparams page uses SMI to call a server side function in server.js and this server side function is what creates the schedule.

Thanks

Hi @Chris_Scaglione,

Our team believes that it never worked before as well. No other features used in SMI will work if invoked from the iparams page. As @Santhosh mentioned, it would be a bug if works on local simulation with Freshworks CLI (FDK).

Hi @Raviraj,

Creating a schedule using SMI from the iparams page has worked in the past since we have customers using the integration and they are syncing on a daily basis.

Thanks,

Chris