Marketcircle    Forums  Hop To Forum Categories  Daylite  Hop To Forums  Using Daylite    Automated start/stop of openbase
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Apprentice
Posted
Hey folks. Just trying out Daylite demo now.

I am wondering if there is a way to automatically start and stop openbase and/or daylite using a shell script or applescript?

I would like to completely shutdown Daylite and openbase when I am not using it.


Also, is there a detailed technical manual for this product?
 
Posts: 36 | Registered: July 06, 2008Reply With QuoteEdit or Delete MessageReport This Post
Pro
Posted Hide Post
Hi Dewdman42
Please explain further why you would like to have it completely shut down. When teh apps are not being used they just sit in the background and use little if any processor. Check out activity monitor in your utilities folder. No detailed manual. They took it away. I hope MC brings it back.
 
Posts: 203 | Location: Carver Mn. | Registered: August 17, 2007Reply With QuoteEdit or Delete MessageReport This Post
Apprentice
Posted Hide Post
Are you saying it can't be done?

For one thing, I use my computer for multiple uses, including audio production and while doing audio production I need everything else that is not needed shut down, not consuming any resources.

For another thing, I have read about how to use the Openbase manager to create a backup image. Sounds good. I also do a nightly SuperDuper backup image of the entire system. It would be nice if that image was also valid, but as it sits, if I have to restore, I would have to restore the SuperDuper image and then restore Daylite. Do I have that right?

Anyway, that is a lesser concern since its possible to restore Daylite's DB after a SuperDuper restore. However, the issue about resource consumption by OpenBase when I'm trying to do audio production is another story.

So is it not possible to automate the shutdown and startup of all Daylite resources?
 
Posts: 36 | Registered: July 06, 2008Reply With QuoteEdit or Delete MessageReport This Post
Journeyman
Posted Hide Post
I wouldn't recommend running anything else than the database on the machine. DBs can become corrupt.
I have a Xserve running nothing but a FMP database and a Cube G4 running Leopard that runs the openbase server.
 
Posts: 58 | Location: Canada | Registered: September 30, 2007Reply With QuoteEdit or Delete MessageReport This Post
Apprentice
Posted Hide Post
Running a seperate mac just to host this DB is not an option for me. I am a small shop, that is way overkill.
 
Posts: 36 | Registered: July 06, 2008Reply With QuoteEdit or Delete MessageReport This Post
Apprentice
Posted Hide Post
For anyone that is following this thread in the future. I found my own answer to the question, quite by accident.

/Library/OpenBase/bin/openstop -database <db_name>

and

/Library/OpenBase/bin/openstart -database <db_name>

I tested it and it works.
 
Posts: 36 | Registered: July 06, 2008Reply With QuoteEdit or Delete MessageReport This Post
Journeyman
Posted Hide Post
"Running a seperate mac just to host this DB is not an option for me. I am a small shop, that is way overkill."

Whatever, your choice. Spend some bucks now or spend a lot more later.
You can pick up a used tower for as few hundred $ that could run DL and avoid potential problems in the future.
I'm a small shop too, BTW. I picked up an Xserve dual G5 for 600 $ and it runs my FMP database without any problems. You could get a used Mac mini and backup on me.com and/or an external FW HD.
 
Posts: 58 | Location: Canada | Registered: September 30, 2007Reply With QuoteEdit or Delete MessageReport This Post
Apprentice
Posted Hide Post
Related to this issue of openbase being stopped and started, does anyone know if its generally safe to force quit daylite?

basically I am thinking that if I do the following, it should be safe in terms of DB consistency:

1 - Quit or Force quit daylite
2 - stop openbase
3 - do whatever
4 - start openbase
5 - start daylite

As long as openbase always deals with complete autonomous transactions then I think it should be totally safe to force quit daylite, the worst that could happen is that something in progress would not be committed to openbase. But can anyone confirm that for me?

I have found that if I stop openbase while daylite is sitting idle, then daylite goes into a spinning beach ball, which can't be good.
 
Posts: 36 | Registered: July 06, 2008Reply With QuoteEdit or Delete MessageReport This Post
Marketcircle Team
Picture of Sebastien
Posted Hide Post
quote:
Originally posted by Dewdman42:
Related to this issue of openbase being stopped and started, does anyone know if its generally safe to force quit daylite?


Daylite should never be force quit unless absolutely necessary.

quote:
...it should be safe in terms of DB consistency:

1 - Quit or Force quit [edit - NO!] daylite
2 - stop openbase
3 - do whatever
4 - start openbase
5 - start daylite


That would be the correct sequence to follow.

Please note however that once a database has started, the OpenBase processes generally do not use much (if at all) CPU while the database isn't being accessed.

Another thing you might want to check is if your databases are set to start at boot automatically - this can be checked in the Administration preference pane in Daylite Preferences - I'm guessing you'd want that feature off.

Also note that Daylite will automatically start up a database when you first attempt to log into it, so you wouldn't need to go into OpenBase to start it up first, skipping step 4 above.

quote:

I have found that if I stop openbase while daylite is sitting idle, then daylite goes into a spinning beach ball, which can't be good.


That's basically "pulling the rug from under its feet" - stopping a database while there's active connections to it will make the client application (Daylite) wait until it gets a response from the database. Always log out of the database or quit out of Daylite first.



Need help in Daylite or Billings? Check the Help menu for Apple Help documentation.
 
Posts: 444 | Registered: April 23, 2007Reply With QuoteEdit or Delete MessageReport This Post
Apprentice
Posted Hide Post
Right. Obviously Force Quit is not ideal, but hopefully daylite is designed in such a way that if the application dies or is force quited, the openbase DB will not become corrupted due to autonomous database transactioning. So it should not matter. If its possible to cleanly quit Daylite with an Applescript I will look into that.

I hear you about the other stuff, leave openbase to not start on boot and basically just let Daylite start it up whenever it needs to. I will probably write a wrapper script that can stop openbase when daylite quits. Call me paranoid, but that's just me. I don't use Daylite all day and I don't want it on unless I need it. Besides CPU use, there are other resources that could be used by openbase, such as memory.

But I also plan to do a nightly image backup of my entire computer with SuperDuper and this will ensure that the openbase DB files will be ok for that backup. I still plan to have openbase save an image of the DB itself just prior to doing my system backup, but hopefully I should never need to use that providing openbase is shutdown before doing the backup.

Anyway, that's the plan. I'm about ready to pull the trigger on purchasing Daylite. I'm really pleased with the features, many of which I will never need, but I watched some online videos about applying GTD with Daylite, smartlists, etc..and I'm fairly sold.

Now if I can figure out how to sync up with my smartphone...
 
Posts: 36 | Registered: July 06, 2008Reply With QuoteEdit or Delete MessageReport This Post
Apprentice
Posted Hide Post
Hmm. it appears there is more to the story. several deamons that need to be running, which Daylite does NOT start up automatically... openmonitor, openexec and openinfo.

I will try to see if I can start them manually, but I just want to say, I see this as a really annoying thing that OpenBase and MarketCircle do not provide a way to completely shutdown daylite, including all Openbase related deamon processes. There should be a way. maybe not the default, but forcing us to have that crap running so that the 5% of the time we need to use our CRM it will work is annoying. That is the main reason I tried out Contactizer first actually. Unfortunately for me, I like Daylite better so I'm trying to work with it.
 
Posts: 36 | Registered: July 06, 2008Reply With QuoteEdit or Delete MessageReport This Post
Apprentice
Posted Hide Post
In case there are any other freaks like me, I have more or less figured this out and wanted to share.

Here is a bash script to stop Daylite and all OpenBase software cleanly:
quote:

  if [ `whoami` != "root" ]
  then
        echo sudo required
        exit 1
  fi


  # Stop daylite with applescript

  /usr/bin/osascript <<__END__
  tell application "System Events"
        tell application "Daylite" to activate
        keystroke "q" using {command down, option down}
        keystroke "q" using {command down}
  end tell
  __END__

  # Stop the Sample Database (use your own name)
  # NOTE - anyone know if there is a stop all?

  /Library/OpenBase/bin/openstop -database Sample_RealEstate

  # Stop the openbase deamons

  launchctl stop com.openbase.com.openexec

  killall -c OpenBase
  killall -c databackup
  killall -c openmonitor
  killall -c openexec
  killall -c openinfo




In order to start the openbase deamons again so that they will be ready for Daylite to start, use the following script:

quote:

  if [ `whoami` != "root" ]
  then
        echo sudo required
        exit 1
  fi

  launchctl start com.openbase.com.openexec

 
Posts: 36 | Registered: July 06, 2008Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

Marketcircle    Forums  Hop To Forum Categories  Daylite  Hop To Forums  Using Daylite    Automated start/stop of openbase

© Copyright 2006 Marketcircle Inc. All rights reserved.