Jump to content

  •  

Photo

Globals Conflict on FMS

globals fms multi-thread

  • Please log in to reply
6 replies to this topic

#1 bcooney  consultant

bcooney
  • Moderators
  • 5,787 posts
  • LocationLong Island, NY
  • FM Application:13 Advance
  • FMGo:iPad
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:9, 10, 11, 12
  • Membership:TechNet
  • Time Online: 23d 23h 13m 26s

Posted 16 February 2012 - 09:35 AM

I need clarification on how FMS schedules process. Our system has several server scripts that run at night. They are called from separate schedules and we assumed that they each run the File Open script.

1. If Schedule 1 takes 3 hrs and Schedule 2 starts at 2am, does it run concurrently or wait until Schedule1 is complete?

2. If it runs concurrently, does Schedule 2 run the File's Open Script or does it say, "hmm...I already have a session, I'll skip the Open Script?"

I ask because we are seeing unexpected settings to our global fields. These fields are set in the Open Script. We're starting to think concurrent server scripts are "overwriting" the global values. We are considering a master server script controller to avoid concurrent server scripts (if that's necessary).

tia,
Barbara
  • 0

#2 Ron Cates  journeyman

Ron Cates
  • Members
  • 516 posts
  • LocationMorristown TN ( Near Knoxville )
  • FM Application:12 Advance
  • Platform:Windows 7
  • Skill Level:Intermediate
  • Membership:TechNet
  • Time Online: 21d 1h 15m 36s

Posted 16 February 2012 - 10:18 AM

You would not see values in Globals set by a server script because globals are specific the the user and in order to see global values set by the server, you would have to be the server :unsure:
  • 0
"I don't think I am a Newbie anymore. But I still feel like one sometimes :)"

Ron Cates

#3 bcooney  consultant

bcooney
  • Moderators
  • 5,787 posts
  • LocationLong Island, NY
  • FM Application:13 Advance
  • FMGo:iPad
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:9, 10, 11, 12
  • Membership:TechNet
  • Time Online: 23d 23h 13m 26s

Posted 16 February 2012 - 10:29 AM

Let me clarify. These scripts set fields in records to the global value. We are receiving the incorrect global value.
  • 0

#4 Ron Cates  journeyman

Ron Cates
  • Members
  • 516 posts
  • LocationMorristown TN ( Near Knoxville )
  • FM Application:12 Advance
  • Platform:Windows 7
  • Skill Level:Intermediate
  • Membership:TechNet
  • Time Online: 21d 1h 15m 36s

Posted 16 February 2012 - 11:17 AM

Let me clarify. These scripts set fields in records to the global value. We are receiving the incorrect global value.



It seems to me the only Global values that the server can draw from were either there when the file was hosted or they would have to have been set by the server previously.

Barbara, I know you are far more advanced than I, so I'm just curious more so than trying to offer an answer. I doubt I could come up with anything you haven't already thought of. :)
  • 0
"I don't think I am a Newbie anymore. But I still feel like one sometimes :)"

Ron Cates

#5 dansmith65  veteran

dansmith65
  • Members
  • 859 posts
  • LocationB.C. Canada
  • Certification:8, 11, 12, 13
  • Membership:TechNet
  • Time Online: 15d 2h 32m 56s

Posted 16 February 2012 - 11:37 AM

I don't know the answer either, but here is a test I would do...
  • Create a script that pauses for a few min (if pause isn't a server compatible step, then have it do something to take up a few min. time).
  • Make the "on file open" script create a new record, and insert the current timestamp into a field.
  • Schedule the server to run the "pause" script twice: 1 min apart (separate schedules)
  • Look at the records created, and the time's in the timestamp field.
  • If only one record is created, then the "on file open" script IS skipped for the second script
  • If two records are created, and the time between the timestamps is more than 1 min. apart, then the server does wait for the first script
  • If two records are created, and the time between the timestamps is 1 min, then they are both triggered on schedule, regardless of other running scripts
ps. might also want to save the timestamp when the script finishes to be sure the first script was running when the 2nd script started.
  • 0

#6 Fitch  Imaginary friend

Fitch
  • Moderators
  • 4,048 posts
  • LocationPortland, Oregon
  • FM Application:13 Advance
  • FMGo:iPhone / iPod Touch, iPad
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:7, 8, 9, 10, 12, 13
  • Membership:TechNet
  • Time Online: 16d 17h 9m 28s

Posted 16 February 2012 - 12:53 PM

The current behavior of server is that when a server script sets a global, the value then becomes the default, just as if the global had been set in single-user mode.
  • 0
Tom Fitch :: Portland, Oregon :: Fitch & Fitch: FileMaker consulting

#7 bcooney  consultant

bcooney
  • Moderators
  • 5,787 posts
  • LocationLong Island, NY
  • FM Application:13 Advance
  • FMGo:iPad
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:9, 10, 11, 12
  • Membership:TechNet
  • Time Online: 23d 23h 13m 26s

Posted 17 February 2012 - 08:56 AM

It boils down to confirming that schedules queue and do not run concurrently, even if they are run as two different accounts, and so server has only one set of globals at any one time. Also, every time a schedule is run, server performs the File Open script.

Thank you for the suggestions.
  • 0




FMForum Advertisers