appwrite icon indicating copy to clipboard operation
appwrite copied to clipboard

🐛 Bug Report: The Cron Scheduler for functions behaves strangely

Open Asored-D opened this issue 3 years ago • 2 comments

👟 Reproduction steps

The Cron Scheduler for functions behaves strangely. Under certain conditions the function is executed, under others it is not.

Scenario 1

  1. Create a function without event triggering. Instead define a scheduler with cron syntax
  2. Type in the cron syntax: * * * * * (trigger every minute)
  3. The function is executing successfully every minute 👍

Scenario 2

  1. Create a function without event triggering. Instead define a scheduler with cron syntax
  2. Type in the cron syntax: 30 14 * * * (today at 14:30 or 02:30PM. You can replace the time with a time in the near future)
  3. The function does not execute 👎

Checking the syntax with the Crontab.guru (https://crontab.guru/#30_14___*) we see that the cron syntax is correct. But why no function gets executed?

👍 Expected behavior

I expect the same behavior between the cron syntax * * * * * and 30 14 * * * triggering the function on the expected time.

👎 Actual Behavior

Currently there seems to be some problems by interpreting the cron syntax.

🎲 Appwrite version

Version 0.15.x

💻 Operating system

MacOS

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Asored-D avatar Aug 09 '22 12:08 Asored-D

@Asored-D, thanks for raising this issue! 🙏 . I believe the timezone for our cron syntax is UTC. Can you make sure you pass the hour in UTC?

Also, would you please share your function as JSON? You can view the JSON in the Overview tab of your function.

stnguyen90 avatar Aug 09 '22 19:08 stnguyen90

@Asored-D, have you had a chance to check this?

Please respond or I will need to close this due to inactivity.

stnguyen90 avatar Sep 04 '22 13:09 stnguyen90

Closing due to inactivity.

stnguyen90 avatar Oct 13 '22 00:10 stnguyen90