Skip to content

Cron Activity with wrong expression crashed the Elsa Studio #906

Description

@msharjeel-iu

Description

I am trying to create a workflow which start with a Cron Job (9pm of every 26th of the month) using Elsa Studio (3.7.0),
When I publish, it crashes with ApiException: Response status code does not indicate success: 400 (Bad Request).
Without Cron activity, the workflow gets published without any issue

Steps to Reproduce

When click to Publish button after adding the Cron activity (* 21 26 * * ?) Or (* 21 26 * *)

  1. Detailed Steps:
  • Created HttpRequest (GET)
  • Tested the request, it works fine
  • Add Cron activity before HttpRequest
  • Save the workflow
  • Publish workflow
  1. Reproduction Rate:
    Every time

  2. Video/Screenshots:

Image Image

Expected Behavior

Publish the workflow and show the success message

Actual Behavior

Esla Studio crashed with error
ApiException: Response status code does not indicate success: 400 (Bad Request).

Screenshots

Image

Environment

  • Elsa Package Version: 3.7
  • Operating System: Windows 11 (Enterprise).
  • Browser and Version: Edge Version 149.0.4022.62

Additional Context

Response from DevTools (Network > Http call response)
{ "statusCode": 400, "message": "One or more errors occurred!", "errors": { "generalErrors": [ "Error when parsing cron expression: The given cron expression has an invalid format. Hours: Value must be a number between 0 and 23 (all inclusive)." ] } }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions