AnsweredAssumed Answered

PSOS fails unless manually triggered - why?

Question asked by wedgeman on Oct 11, 2018
Latest reply on Oct 16, 2018 by wedgeman

I'd LOVE very much for someone to advise what I've done wrong on this.  I'm sure it's a simple one - I just can't seem to see why.. 

 

So this triggers reports for a number of technician production reports, set up as a scheduled PSOS, to run at midnight (emailing each technician his completed report from the previous work day).

 

 

 

Here's what happens.

 

 

If I schedule this script directly from the server, it goes out to each tech on time.  BUT there is no attachment. and the Admin Console shows > Status > "Filemaker Script error" on that script..

 

For testing purposes only, I wrote a trigger script that calls this script as a PSOS. The trigger does NOTHING else - just a "PSOS>(scriptname)"...

 

If I manually trigger it (using the PSOS script), everything goes PERFECTLY.  Everybody gets their email with the PDF attachment, and each one arrives aprox 1min apart. (i dropped the 66 second delay in there because each report record contains about 30 unsaved calculations over parts/supplies/commissions/etc, so I was assuming the server need a little time to pull all calcs - -and besides, there are only a few dozen techs and it's not as if they are dying to have their daily reports at 12:15am).

 

Notes:

There is no script parameter in the script - i wrote it assuming PSOS.

 

The TEAM table is a list of all Team members - - the "perform find" narrows it to those eligible to receive a report.

 

The ONLY difference between it working perfectly or not, is if I trigger it manually using the PSOS trigger.

 

what am I missing?

Outcomes