xochi Posted October 2, 2006 Posted October 2, 2006 I'm playing around with using "robot" users under OS X, and wanted to bounce around some ideas/tips. By "robot user" I mean a filemaker client that is connected to a filemaker server which processes various tasks automatically by staying in a ScriptMaker loop. This is sometimes necessary because many tasks can't be done from the filemaker server itself (such as sending an email via IWP, exporting data to PDFs, etc). Generally, this user has a dedicated mac all to themselves. Here are some ideas/questions I've had: 1. For sending emails, I have found that a robot user works pretty well. Configure apple Mail with the proper settings, etc. One problem I've had though is that if any error happens (such as a malformed "to:" address), Apple Mail will pop up an error dialog and freeze. You have to manually go in and clear out the error message to get it started again. Anyone found a solution for this? Maybe the robot user should be using a SMTP plugin to send mail instead of Apple Mail.app? 2. I'd love to get my robot users working using Fast User Switching (FUS), with a user account that's actually on the server machine. This would have numerous advantages (such as not requiring multiple machines, should be fast as h*ck since all data will stay on the same machine). 2A -- some folks believe that having FileMaker client on the same machine as filemaker server is a recipe for disaster. I've done some tests and it actually seems ok -- with proper os / file permissions, the robot user account can not physically see the hosted database files, so there's no way you can accidentally open them from the local disk. Opinions? 2B -- I like to run headless servers and access them via Apple Remote Desktop. However, I'm finding that FUS and ARD don't play well together. When I switch users, ARD dies and I have to reboot the server to get it working again. This has happened in both ARD 2 and 3, with both Mac OS X and Mac OS X Server. Anyone else found this to work?
IanC Posted October 2, 2006 Posted October 2, 2006 I use a robot machine on 3 of my systems, mainly with IWP for PDF reports but also for mail. On two of these systems the robot account is on the same machine as the server. Pre FM7, this would have indeed been a recipe for disaster, but as long as you ALWAYS open the files through the server I've never had a problem - I've had this running for over a year. On one of the systems that is on the same machine as the server, the tasks are getting more intensive as we are also running PDF shrink and IWP so we are going to buy another machine just for the robot and IWP. I can't see how FUS can help as I thought it logged you out? Perhaps this has changed. Re: email addresses I check everything in FMP before sending to Mail. Also I have to run strict open record checks before committing any changes to a record in case another user is accessing, otherwise you either will get a "Someone else is modifying error" or not update your record correctly. Hope this helps.
xochi Posted October 2, 2006 Author Posted October 2, 2006 Fast User Switching allows you to keep multiple users logged in at once, so in theory you could start up your mac, open the server user, then switch over to the robot user, and both will be active. In fact, I think that FMServerd runs in the background, so you don't even need to have a specific user for that one, as long as the server is set to start up automatically. You could even have a third user online, if you needed to use the computer as a general purpose machine. Just make sure all accounts have passwords and nobody will accidentally be able to switch to accounts you don't want them to...
xochi Posted October 2, 2006 Author Posted October 2, 2006 Re: email addresses I check everything in FMP before sending to Mail. Do you have a formula you could share for validating email addresses?
Steven H. Blackwell Posted October 2, 2006 Posted October 2, 2006 it is not a good idea to have FileMaker Server start automatically. In the event of an inelegant shutdown, you will want to (a) know it and (: examine the files carefully before they are rehosted. I am currently remediating a set of files that suffered this type ill consequence at a cost of a multiple of what would have been spent to configure the system properly ab initio. I would recommend against running the FileMaker Pro application on the same server as FileMaker Server at the same time. You don't want to do anything that could cause that machine to have problems. Protected memory notwithstanding, I would not want to contemplate what could happen to the hosted files if the application crashed. Perhaps one day we will have full Server side scripting. And that in turn will raise a whole set of new issues to be managed. There are days when I yearn for FMP 2.1v3 and Mac OS 7.6.1. Steven
Ender Posted October 2, 2006 Posted October 2, 2006 (edited) 1. For sending emails, I have found that a robot user works pretty well. Configure apple Mail with the proper settings, etc. One problem I've had though is that if any error happens (such as a malformed "to:" address), Apple Mail will pop up an error dialog and freeze. You have to manually go in and clear out the error message to get it started again. Anyone found a solution for this? Maybe the robot user should be using a SMTP plugin to send mail instead of Apple Mail.app? I use a dedicated machine for this purpose. I like the SMTPit plug-in for this, as it has more options for sender and recipients, and handles errors internally. 2B -- I like to run headless servers and access them via Apple Remote Desktop. However, I'm finding that FUS and ARD don't play well together. When I switch users, ARD dies and I have to reboot the server to get it working again. This has happened in both ARD 2 and 3, with both Mac OS X and Mac OS X Server. Anyone else found this to work? You might try Timbuktu instead. It seems to allow control through user switching. Edited October 2, 2006 by Guest
briandye Posted October 3, 2006 Posted October 3, 2006 By "robot user" I mean a filemaker client that is connected to a filemaker server which processes various tasks automatically by staying in a ScriptMaker loop. This is sometimes necessary because many tasks can't be done from the filemaker server itself (such as sending an email via IWP, exporting data to PDFs, etc). Generally, this user has a dedicated mac all to themselves. Can you tell me more about this? This sounds like it may be a soltuion to what I am trying to acomplish. I have a database that I would like to send out emails on creation of a new record. I would like users logged in using IWP to be able to add a record and when they do a party is notified... Is this possible with these "robot" users. I am running Filemaker Adv Server, and I see I cannot run my Mail.It script when logged into a Database using IWP. Does anyone have a solution to this.... any help would be much appreciated.
IanC Posted October 3, 2006 Posted October 3, 2006 Like Steven pointed out - having a Robot on an FM Server machine is not an ideal situation, if you can locate it on a seperate machine then it's a much better idea. But if you have a script that runs once a week/day then it's hard to justify an extra machine sometimes. I use Cron (cronnix interface) to trigger the relevant filemaker script (via applescript). I also use Timbuktu to access the server as I work remotely. As for email validation, mine is only simple, but it captures the most common errors - probably best to look through the lists of custom functions on the web for something more thorough but here's mine, it returns as TRUE for an error. Let( [ atPos= Position ( email ; "@" ; 1 ; 1 ) ; dotPos = Position ( email ; "." ; atPos ; 1 ) ; spaces = PatternCount ( email ; " " ) ; commas = PatternCount ( email ; "," ) ; theLength = Length ( email ) ] ; If( ( atPos < 2 ) or ( dotPos < 2 ) or ( dotPos = theLength ) or ( ( spaces + commas ) > 0 ) ; 1 ) )
brian rich Posted October 3, 2006 Posted October 3, 2006 FWIW. I'm working up a solution using Dacons Scriptfire to coordinate bi-directional data exchange between Filemaker and another application which accesses and updates tables set up for data interchange using ODBC. The job of the robot is to tidy up the tables afterwards. The robot will most definitely run on a dedicated computer running FMP 8.5 Client with Scriptfire and Mail-it plug-ins installed. We wouldn't even consider risking running this on the Filemaker server which is rock solid for all features of Advanced. At the moment, we anticipate having to manage starting and stopping the client application manually, as we can afford an hour or two of downtime if necessary. So far, Scriptfire has worked faultlessly; the only problems in the interface occur when one or the other application tries to update a record which is already in use - which needs some additional error management in both Filemaker and the other application. Mail-it will allow the client - as part of the tidying up process - to construct and manage mails which will be used to inform users that their requests have been successfully executed. Brian Rich ruralnet|uk www.ruralnet.org.uk
Martin Brändle Posted October 3, 2006 Posted October 3, 2006 Running FMS and FM Pro at the same time on the same machine is not a good idea. You get a port conflict on the open FileMaker ports (e.g. 5003). Otherwise, the idea to set up a robot process is fine. E.g., for e-mailing, you could set up a cron job that uses curl and a Custom Web Publishing URL that calls a PHP or XSLT page which fires the e-mail. Both crontab and curl are standard with OS X or OS X server. Nothing else needed.
xochi Posted October 3, 2006 Author Posted October 3, 2006 Running FMS and FM Pro at the same time on the same machine is not a good idea. You get a port conflict on the open FileMaker ports (e.g. 5003). The conflict only arises when both Server and Client are trying to share files via that port. If client has network sharing turned off, then it works just fine (FileMaker/Sharing/Network/Network Sharing: Off). This definitely worked under 5.5/6, I've not actually tested this under 7/8 but it should work.
Martin Brändle Posted October 9, 2006 Posted October 9, 2006 (edited) Post deleted. Edited October 9, 2006 by Guest Fingers were faster than brain.
Recommended Posts
This topic is 6619 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now