How do I run a script say… in the middle of the night… automagically?
We generally recommend using the free tool Lingon (or Cronnix on older systems) to set up a script to be run from the command line at a particular time.
This will work for Eggplant FT (Purple). If you are running Eggplant SE (Green), as I think you may be, you don’t have the ability to run scripts from the command line. In that case your options are more limited. About the only thing I can think of would be to write a script that waits until the desired time and then runs the script you want. Of course, you’ll have to start this “timed launcher” script manually and leave it running for it to do what you want.
You can do this by executing Eggplant from Eggplant’s CLI directly from a cron job. You could for example, use Cronnix as your GUI front end to schedule your Eggplant scripts to run at night.
It has better scheduling abilities or the ability to run scripts on demand, or if you scripts are under source control it will check for modifications and you could run scripts any time they change as a simple test. It will also allow us then to kick the results out to any person who needs to know in many different formats. We can email people if they fail if it is that important. Yes, running .NET on a mac requires mono so you may be happier on the original CruiseControl but it works great.
Both GUI application alternatives for running an automated Eggplant script appear to be dead now.
Lingon may not have been updated since version 2.1.1
tuppis.com (where the script used to be hosted) won’t load, and I have tried unsuccessfully to schedule a script in version 2.1.1 of Lingon with Snow Leopard OS.
Cronnix (may have been updated to version 3.0.1 - I only have version 3.0) and the script used to be hosted at serverkompetenz.net but version 3.0 seems to work ok for modifying the Snow Leopard cron.
So, if you can find an old version of Cronnix or modify the cron manually you are fine - but Lingon does NOT appear to be a viable alternative now.
If anyone knows any differently please reply.
Cronnix can still work fine for most Eggplant uses.
It’s unfortunate that Lingon is no longer maintained, but for more complex actions you might just want to check out using launchd directly.
You can find out more about launchd by reading Apple’s documentation.
Or a good wrap up is also provided by AFP548