Ignition MES : Client Windows Update

Hi,
I want to generate a complete week schedule each Sunday with a gateway script. I have tried to enter data directly in the database and use this code ‘‘system.schedule.resetScheduleCache’’ to update the Schedule of each Client but it doesn’t work.

Is there a Update function that exist to refresh each client windows? Or How can I code this function?

thank you!