I'd check the log to see what kind of error occurred.
Your steps appear to exactly match what's specified in the Knowledge Base article on this process so I'm not sure why it didn't work. I'm wondering if you have the appropriate write permissions on the documents directory.
The logs look fine, I think. On the job that completes with an OK, I get this in the log -- it all makes sense from my end:
2010-10-27 11:45:03.050 -0600 Information 146 SPECED01 Schedule "Daniel ProComp Export" run now by "fmadmin [126.96.36.199]".
2010-10-27 11:45:03.050 -0600 Information 689 SPECED01 Schedule "Daniel ProComp Export" has started FileMaker script "Daniel Export ProComp Data".
2010-10-27 11:45:03.300 -0600 Information 150 SPECED01 Schedule "Daniel ProComp Export" completed.
Thanks for your help, though. I'm really puzzled by this one.
That is odd. If you get "filemaker script error" as the status, the script error should be logged. Often you get more "errors" logged than you really want to see when a scheduled script executes as scripts that use Go To Next Record, exit after last log an error when they exit the loop--just to give one example.
Thanks for the help, there must be some small thing I need to tweak. When I run the export with the path hard-coded, the status returns as "OK" and there are no errors in the log. It's just my file never shows up anywhere on the server!
I just spotted one of those picky details that drive us all crazy. Maybe it was a typo when you posted your script, but:
4- Export Records[No dialog; "$varpath.xls"] (with filetype specified as Excel in the dialog box)
4- Export Records[No dialog; "$varpath"] (with filetype specified as Excel in the dialog box)
And the only quotes araound the variable should be those that appear in the script editor after you specify the options for the step (Don't type them in).
Thank you, I think that was part of the problem. When I run it with that method, it still gets a "FileMaker Script Error."
Looking at the log, it appears to be Error 800, "Unable to create file on disk."
2010-10-27 13:33:05.529 -0600 Information 146 SPECED01 Schedule "Daniel ProComp Export" run now by "fmadmin [188.8.131.52]".
2010-10-27 13:33:05.529 -0600 Information 689 SPECED01 Schedule "Daniel ProComp Export" has started FileMaker script "Daniel Export ProComp Data".
2010-10-27 13:33:05.732 -0600 Information 645 SPECED01 Schedule "Daniel ProComp Export" scripting error (800) at "Personnel 2010-11 : Daniel Export ProComp Data : Export Records".
2010-10-27 13:33:05.794 -0600 Information 644 SPECED01 Schedule "Daniel ProComp Export" completed; last scripting error (800).
When I create the schedule, I fill in the "Use the following account to access the database" of the account for that particular database -- that is, the account used to login to that particular Personnel database. However, the script seems to be running as fmadmin, the administrator name on the server, based on the log. I would think fmadmin would be the account with rights on the C:\Program Files\FileMaker\FileMaker Server\Data\Documents, but does anyone know if it may be trying to use the particular database login?
The same fmadmin account happily creates backup schedules on C:\Program Files\FileMaker\FileMaker Server\Data\Backups, so I'm not sure what to do.
That appears to confirm my original suspicion--that your documents directory doesn't have the correct permissions set to allow creating files in the directory. You should be able to find this directory on the server and check/change the permissions so that fmadmin has write permissions. I suppose if your C partition is full you might also get this error, but that seems unlikely given that your systems are backing up successfully.
i'm kinda having the same problem, but on a mac.
I also get the 800 error code, but i've already did a chmod 777, so it seems unlikely that FileMaker Server doens't have write access to this directory...