Back

Scheduling function in seconds [solved]

  • 0
  • Functions
CodingXeer01
18 May, 2024, 17:00

If i want function to schedule for 30seconds, how can i do that??

if i try this 0/30 * * * * * then it give this error:

TypeScript
Invalid `schedule` param: String must be a valid cron expression
TL;DR
Developers are trying to schedule a function to run every 30 seconds using a cron expression but are facing an error. The correct format for scheduling a function in seconds is not possible with traditional cron syntax, as it works on minute-level granularity. An alternative solution would be to run a loop inside the function with a sleep timer set to 30 seconds.
Steven
18 May, 2024, 17:03

You can't

CodingXeer01
18 May, 2024, 17:04

Got it.

CodingXeer01
18 May, 2024, 17:04

Scheduling function in seconds [solved]

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