4 Replies Latest reply on Sep 21, 2016 7:16 AM by nicolai

    osx script automation


      I have a script creates daily pdf reports and sends as email to managers. Unfortunately save as PDF is not supported on Server.



      My solution is a new fmp file that trigers report script on startup, and close FileMaker after reporting script is done. In windows machines the file is started by "task schedlule" in Windows.



      I want to use same method in Mac OSX. I have created automator workflow. It opens my starter files when I double click it. I also added my workflow to iCal to run at 8:00 pm. When I connected to Server machine with screen sharing, it is ok, the workflow starts the file and run my reporting script. But when I disconnect from the server iCal does not triger the workflow.



      Is there any alternative to open my filemaker file in daily periods?

        • 1. Re: osx script automation

          Although it's not perfect (bug(s) with container fields), FileMaker has good JDBC connectivity. PDF generation is well understood and there are free APIs (like version 2.x of iText -- stay away from version 5 of iText unless you want to pay big bucks).


          Depending on your needs and budget, it's not difficult to read data from FileMaker and write PDFs directly using iText. iText is simple to use and very powerful. I've done this a lot. And, it can all be automated too.


          HOPE THIS HELPS.

          1 of 1 people found this helpful
          • 2. Re: osx script automation

            Thank you for your advise.


            I prefer easy way if possible but I want to try iText. I have no Java skills, do I start to use iText easily? Do you recommend any learning tool/tutorial?

            • 3. Re: osx script automation

              Sure, it's not that difficult and don't be put off by Java (the #1 programming language).


              Here's a tutorial: Creating PDF with Java and iText - Tutorial


              You can download iText here: iText®, a JAVA PDF library | SourceForge.net




              Just get an iDE like Eclipse and plan to spend a week or so getting up to speed. If you work through the tutorial, step by step, and find others on Youtube. etc., the fog will clear and you'll be in a VERY STRONG position to take control of your PDF needs.


              If you have questions, I"ll try to help.


              HOPE THIS HELPS.

              2 of 2 people found this helpful
              • 4. Re: osx script automation


                But when I disconnect from the server iCal does not triger the workflow.


                Have a look at System Agents and Daemons. One of the settings is to run script (bash or AppleScript) at the time intervals and as far as I remember there is no need for a user to login. You can start with User Agents and try to set them to run always, but I am not sure if they work after logging out.


                Creating Launch Daemons and Agents

                1 of 1 people found this helpful