Back

CRON not working properly, or I'm missing something.

  • 0
  • Self Hosted
  • Functions
ponguta_
18 May, 2024, 20:55

Hello, I have a question.

I have an Appwrite installation, I always use some CRON functions to execute code every minute or every two minutes.

Right now, I want to run a CRON function every day at 1:00AM, but so far no luck.

I did try with 0 1 * * * and 0 1 */1 * * but doesnt work.

So yesterday I put a function that will try to create a document, and the id for that document will be the date of the new Date - 5 hours - 24 hours (I'm living on -5 GMT)

So what was the point of that? I want to create a document with something like 2024-05-17 and I will register the time when it was created. And because it will be the same ID, it will not let the document to be created.

So I was expecting my test to create the document with ID 2024-05-17 on 2024-05-18 at 00:00 or so, but ended up creating the document on the 2024-05-17 at 20:00

I hope you understand what I mean with all of these. Thanks in advance.

TL;DR
Issue with CRON not triggering at 1:00 AM daily in an Appwrite installation. Attempted with `0 1 * * *` and `0 1 */1 * *` without success. Created a document to test timing, but it wasn't created at the expected time. The issue may stem from timezone differences. **Solution:** Check and adjust timezone settings for accurate CRON scheduling.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more