Getting a 500 internal server error in a scheduled event

Hi Team

We are developing the paid app for Freshdesk. In this app, we use scheduled events to do some business tasks. I’m able to create a schedule, but it’s not getting triggered. If I try to update, fetch, or delete the schedule, it throws an error. which is a 500 internal server error. This happens randomly on my account.

For example

I have five active schedules in my app, of which two are not getting triggered. The remaining three are getting triggered. I can’t update, fetch, or delete if those two are not triggered. I can update,fetch, or delete the remaining ones that are triggered. For the failed two, I’m getting a 500 internal server error.

server.js

CREATE

 try {
      let data = await $schedule.create({
        name: options.schedule.name,  // my schedule name
        data: options,
        schedule_at: options.schedule.date,    //time format 2023-08-16T09:39:00.000Z
      });

      renderData(null, data);
    } catch (error) {
      console.error(error);
      renderData(error);
    }

UPDATE

 try {
      let data = await $schedule.update({
        name: options.schedule.name,
        data: options,

        schedule_at: options.schedule.date,
      });
      renderData(null, data);
    } catch (error) {
      console.error(error);
      renderData(error);
    }
  },

FETCH

 try {
      let data = await $schedule.fetch({
        name: options.schedule.name,
      });

      renderData(null, data);
    } catch (error) {
      console.error(error);
      renderData(error);
    }

DELETE

try {
      let data = await $schedule.delete({
        name: options.schedule.name,
      });

      renderData(null, data);
    } catch (error) {
      console.error(error);
      renderData(error);
    }

ERROR

Any help will be appreciated. Thanks in advance.

@Raviraj @kaustavdm @Thakur_Ganeshsingh inputs please…

Hi @Kithiyon,

I would recommend creating a support ticket for the respective product to face any issues with our platform where a 500 error is one. This will be a faster way to report issues with our platform and get quicker responses and resolutions.

Is the scheduled event creation consistent with those two events?
Could you share the exact properties provided as inputs for these schedules? If these are sensitive details to be shared publicly, please mention, and I can create a direct message thread with you to get these details.

Thank you @Raviraj

Currently, our app is in marketplace, and I’m not able to get that error on the same account. If I use a custom app, I’m getting that error, so I want to know about the cause of the error. So please create a message thread with me I will share more information.

1 Like