# Cannot get the result when I set the server side schedule script to run every minutes

**URL:** <https://the.fmsoup.org/t/cannot-get-the-result-when-i-set-the-server-side-schedule-script-to-run-every-minutes/3152>\
**Category:** Questions\
**Created:** [October 17, 2022, 5:58am UTC](https://the.fmsoup.org/t/cannot-get-the-result-when-i-set-the-server-side-schedule-script-to-run-every-minutes/3152 "2022-10-17T05:58:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![samfmp](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@samfmp](https://the.fmsoup.org/u/samfmp)\
**Post date:** [October 17, 2022, 5:58am UTC](https://the.fmsoup.org/t/cannot-get-the-result-when-i-set-the-server-side-schedule-script-to-run-every-minutes/3152/1 "2022-10-17T05:58:34Z")

</div>

Hi, I am trying to use a scheduled server-side script to get the result every minute. I have set up the schedule on FMS. It runs without error which can be confirmed on the log. However, I cannot get the expected result.

When I try to execute the schedule immediately or run it once. I could get the expected result.

Does anyone know the reason behind that? Thank you.  
The FMS version is 19.5.2.20, I am trying to execute Google Form API to get responses from a form.

---

<div class="post-metadata">

**Author:** ![bdbd](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bdbd/32/620_2.png) [@bdbd](https://the.fmsoup.org/u/bdbd)\
**Post date:** [October 17, 2022, 12:07pm UTC](https://the.fmsoup.org/t/cannot-get-the-result-when-i-set-the-server-side-schedule-script-to-run-every-minutes/3152/2 "2022-10-17T12:07:22Z")

</div>

Way too short on details to help out. Please tell us more.

---

<div class="post-metadata">

**Author:** ![xochi](https://avatars.discourse-cdn.com/v4/letter/x/0ea827/32.png) [@xochi](https://the.fmsoup.org/u/xochi)\
**Post date:** [October 17, 2022, 1:34pm UTC](https://the.fmsoup.org/t/cannot-get-the-result-when-i-set-the-server-side-schedule-script-to-run-every-minutes/3152/3 "2022-10-17T13:34:03Z")

</div>

First remember that some script steps do not work when running on Server

Also, remember that SSS (or PSoS) scripts are basically run as an entirely separate user connection. This has some implications:

- the context (Table, Records, Sort order, etc.) is not inherited, it has to be scripted to be set up
- the permissions could be different (for SSS, it's whatever user account you run the script as)
- if you are trying to use SSS to inject data into a record, if the record is currently open by the current FMPro (or WebDirect) user, it will fail since the record is locked.
- add more logging - have your SSS script log information about every step (I set up a dedicated Log table for this, but there are many ways to do it

---

<div class="post-metadata">

**Author:** ![samfmp](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@samfmp](https://the.fmsoup.org/u/samfmp)\
**Post date:** [October 21, 2022, 3:41am UTC](https://the.fmsoup.org/t/cannot-get-the-result-when-i-set-the-server-side-schedule-script-to-run-every-minutes/3152/4 "2022-10-21T03:41:36Z")

</div>

Thanks, it seems I found the issue by trapping the error of the api.

It seems that there was an issue of the timestamp which should be in Zulu format.

FileMaker will omit the second if it is 0 second so I have to use serialIncrement to include 00 in my solution.

Thank you all the suggestions above.
