Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: wrong 'next execution' for scheduled functions #851

Closed
2 tasks done
FranciscoKloganB opened this issue Jan 18, 2024 · 2 comments · Fixed by #1151
Closed
2 tasks done

🐛 Bug Report: wrong 'next execution' for scheduled functions #851

FranciscoKloganB opened this issue Jan 18, 2024 · 2 comments · Fixed by #1151
Assignees
Labels
bug Something isn't working product / functions Fixes and upgrades for the Appwrite Functions

Comments

@FranciscoKloganB
Copy link

👟 Reproduction steps

  • Create a function on any Appwrite project
  • Access the newly created function settings and set it to run everyday at a given hour
    • For example, everyday at 2AM using the CRON Expression * 3 * * *
  • Access the functions dashboard
  • Find the function you just created
  • Using your mouse hover the "scheduled clock" icon
  • Verify that that the Next execution: ? is incorrect, e.g.: it says Next execution: Mar 1, 2000, 00:00, instead of saying Next execution: { today || tomorrow }, { year }, 03:00

👍 Expected behavior

It should display the correct date for the next execution:

0 1 * * * maps to Next execution: { today || tomorrow}, {year}, 01:00AM
0 2 * * * maps to Next execution: { today || tomorrow}, {year}, 02:00AM
0 3 * * * maps to Next execution: { today || tomorrow}, {year}, 03:00AM

👎 Actual Behavior

It displays the wrong date for the next execution:

0 1 * * * maps to Next execution: Jan 1, 2000, 00:00
0 2 * * * maps to Next execution: Feb 1, 2000, 00:00
0 3 * * * maps to Next execution: Mar 1, 2000, 00:00

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

Something else

🧱 Your Environment

This issue can be replicated using only appwrite cloud without any other dependencies.

image

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

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@FranciscoKloganB FranciscoKloganB added the bug Something isn't working label Jan 18, 2024
@FranciscoKloganB FranciscoKloganB changed the title 🐛 Bug Report: 🐛 Bug Report: wrong 'next execution' for scheduled functions on Appwrite Cloud UI Jan 18, 2024
@stnguyen90 stnguyen90 changed the title 🐛 Bug Report: wrong 'next execution' for scheduled functions on Appwrite Cloud UI 🐛 Bug Report: wrong 'next execution' for scheduled functions Jan 18, 2024
@stnguyen90
Copy link
Contributor

@FranciscoKloganB, thanks for creating this issue! 🙏 I have noticed some weird behavior with that. We'll have to look into it.

@eldadfux eldadfux transferred this issue from appwrite/appwrite Feb 22, 2024
@eldadfux eldadfux added the product / functions Fixes and upgrades for the Appwrite Functions label Feb 22, 2024
@stnguyen90
Copy link
Contributor

stnguyen90 commented Jun 21, 2024

Some candidates for converting cron to human readable:

Package Stars Size Weekly Downloads
cronstrue 1.2k 1.14 MB 788K
cron-parser 1.3k 54.2 KB 2.9M

@stnguyen90 stnguyen90 moved this to In Progress in 1.5 release Jun 21, 2024
@stnguyen90 stnguyen90 self-assigned this Jun 21, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in 1.5 release Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / functions Fixes and upgrades for the Appwrite Functions
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants