Back

CRON Syntax not executing function

  • 0
  • Self Hosted
  • Functions
  • Web
  • Cloud
Binyamin
18 May, 2023, 11:02

Where have you set the cron syntax?

TL;DR
User is experiencing issues with a CRON syntax not executing a function. They initially set the time to ET but discovered it should be UTC. They tried setting the time according to their local time zone, but it still doesn't work. The server is set to ET, and when they set the execution to once a minute, it works. Another user suggests trying two steps: checking if the function can run by itself, and clearing and re-entering the cron input. The user has set the cron syntax in the function's settings. Solution: 1. Ensure the cron syntax is set to UTC instead of ET. 2. Check
Ranvir
18 May, 2023, 14:32

I have set it in the function's settings

Binyamin
18 May, 2023, 14:40

Well, can you check that the function is able to run by itself? Also I've tried in my cloud account, and I've cleared and saved the cron input. then I've re enter the cron input and then it works

So can you try these two steps?

Ranvir
18 May, 2023, 14:45

I've entered * * * * * and the function runs without me having to press the execute button manually

Binyamin
18 May, 2023, 14:45

So it works?

Binyamin
18 May, 2023, 14:46

Sorry, so when you're setting the execution to be once a minute it works?

Ranvir
18 May, 2023, 14:47

yes i specified that in the last line of my original post

Binyamin
18 May, 2023, 14:47

Got you

Binyamin
18 May, 2023, 14:47

So the server is set to ET

Binyamin
18 May, 2023, 14:48

So if you want your function to be execute every day at 07:00 at GMT you can set to 0 15 * * *

Binyamin
18 May, 2023, 14:48
Ranvir
18 May, 2023, 14:48

ohh i thought it would be something like gmt

Ranvir
18 May, 2023, 14:48

ok thanks for your help :)

Binyamin
18 May, 2023, 14:49

Let me be sure about it

Binyamin
18 May, 2023, 14:53

Yes, I ran an API request to https://cloud.appwrite.io/v1/health/time And the time is like ET

TypeScript
{
    "remoteTime": 1684421581,
    "localTime": 1684421581,
    "diff": 0
}
Binyamin
18 May, 2023, 14:54

So you set to go with ET time zone

Ranvir
18 May, 2023, 14:54

Still dont work :/

Ranvir
18 May, 2023, 14:54

surprisingly

Ranvir
18 May, 2023, 14:54

set it according to my current time zone to test

Binyamin
18 May, 2023, 14:54

What time you've set?

Ranvir
18 May, 2023, 14:54

converted to et time

Ranvir
18 May, 2023, 14:55

ET time

Ranvir
18 May, 2023, 15:01

Very weird for it to not execute when specific time is set but executes when every minute is set

Ranvir
19 May, 2023, 05:08

Turns out the function is not ET but actually UTC from this github post

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