Scheduled trigger module does not work

Hello Atlassian Community,

We are currently developing a Forge app with a Scheduled trigger module as documented here: https://developer.atlassian.com/platform/forge/manifest-reference/modules/scheduled-trigger/.

However, recently the trigger would not fire and no logs are available in the production environment.

manifest.yml

modules:
  webtrigger:
    - key: sync-access-groups-users-jsm-webtrigger
      function: runWebtrigger
  scheduledTrigger:
    - key: sync-access-groups-users-jsm-scheduledtrigger
      function: runScheduledtrigger
      interval: 'hour'
  function:
    - key: runWebtrigger
      handler: index.runWebtrigger
    - key: runScheduledtrigger
      handler: index.runScheduledtrigger
app:
  id: ari:cloud:ecosystem::app/APP-ID
permissions:
  scopes:
    - 'read:jira-user'
    - 'read:jira-work'
    - 'write:jira-work'
    - 'manage:jira-project'
    - 'manage:jira-configuration'
  external:
    fetch:
      backend:
        - 'api.atlassian.com/*'
        - 'https://xyz.atlassian.net/*'

We have exceeded some quotas as mentioned under https://developer.atlassian.com/platform/forge/platform-quotas-and-limits/, especially number of API calls per invocation and number of log lines.

Can it be that our app has been suspended and that’s why the trigger is not fired? How can we know that our app has been suspended if this is the case?

Another explanation would be that we might have made a programming mistake

index.jsx

export { default as runWebtrigger } from './webtrigger';
export { default as runScheduledtrigger } from './scheduledtrigger';

Can two exported functions have the same name?

Thank you in advance.

Regards,
Kevin

Hi @anon45984337

Do you mind sharing your appId so we can investigate a bit more on our side?

As for the code question, did you try testing with forge tunnel and invoking the function as a webtrigger instead? (so you can confirm the code is working as expected)

Hope this helps.

Regards,
Xavier

Hii,
I am also facing an issue like this.
What I have tried → 1. Running the hourly scheduler’s code through webtrigger, 2. using tunnel, 3. Running this on both dev and prod instances.

But sometimes my hourly scheduler doesn’t run for hours!
Like last it ran for say 05:00:00 UTC, then it didn’t run and its been 10:00:00 UTC
Now there is no ISSUES in code as it completely works on webtrigger and I have also set it up on button click.

Moreover, if this happens on dev then its understandable (due to tunnel or stuff) but on prod this kind of incosistent behaviour is something bothering. NOT able to find out why is this happening…

Hi @FranciscoJos

Thanks for reaching out.
We had an incident on Friday whereby Scheduled Triggers that were tied to products pinned in Europe would not get invoked (other regions would not be impacted).

This lasted for a period of 2am - 11am UTC and recovered after the engineering team rolled back a change. More details can be seen on our StatusPage website.

Hopefully this aligns with your experience and things are recovered since then.

Sorry for the inconvenience.

Best regards,
Xavier

1 Like