Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Lingon - Use a GUI to create recurring events Pick of the Week
The macosxhints Rating:

[Score: 9 out of 10]
Lingon has been mentioned in many hints, including one of its very own. However, it's never been a PotW, so now I'm taking care of that oversight.

Lingon is a GUI interface (10.5 only) to the launchd process in OS X. launchd is a way to run things on a schedule -- previously, cron could be used to to this (and it still can, but launchd is the preferred solution). As a user, I found cron relatively simple (if not somewhat obtuse). launchd, however, was another story -- I couldn't understand the need to write an XML file to handle a simple scheduled task. Lingon takes care of all that, though. Using its GUI, you set the action you'd like to run, the times you'd like it run, and any other conditions under which you want your task to run, and Lingon does the hard stuff.

The interface is amazingly simple -- section one is the name for your task (must be unique), section two is the command or program to run, and section three controls the conditions under which it runs. After you have everything set up, click Save, and you're done. Not everyone may need to use Lingon, but if you need to run a recurring task, it's a simple way to get the job done. (It's also a great way to understand launchd better, as you can look at the XML files Lingon creates to see how things work.) You can read any of the linked hints to get a sense of how it works, or just download it and give it a shot.

The only downside to Lingon is that it makes you logout and login to effect the changes to launchd. If you're comfortable with the Terminal, however, you can use launchctl to do this without a logout/login. I hope the ability to have new events take effect immediately is added in a future Lingon release, however -- it'd be nice to skip the Terminal bits.
    •    
  • Currently 1.67 / 5
  You rated: 1 / 5 (15 votes cast)
 
[30,017 views]  

Lingon - Use a GUI to create recurring events | 7 comments | Create New Account
Click here to return to the 'Lingon - Use a GUI to create recurring events' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Lingon - Use a GUI to create recurring events
Authored by: kbradnam on Apr 21, '08 08:44:45AM

Using launchctl to start jobs set up by Lingon is quite straightforward. If you have used Lingon to create a scheduled action (lets say that you name the XML file that Lingon creates 'com.report.weekly.plist') then you just need to run:

launchctl load /Library/LaunchDaemons/com.report.weekly.plist



[ Reply to This | # ]
Lingon - Use a GUI to create recurring events
Authored by: mm2270 on Apr 21, '08 09:03:58AM

I love Lingon. It's helped me make a few simple recurring processes on our systems that just couldn't be done using cron. And like Rob, I couldn't understand how to make the necessary xml file for a launchd process.

The only thing I don't understand is why in the hint it says "Lingon is a GUI interface (10.5 only)" I know for a fact I've used Lingon on 10.4. It may be that the newest version is Leopard only, but it's still possible to locate the older Tiger compatible version I believe. It should be noted in this hint that if you're still using Tiger, you're not out luck with using Lingon.



[ Reply to This | # ]
Lingon - Use a GUI to create recurring events
Authored by: Dr. T on Apr 21, '08 10:55:34AM

What is the advantage to using Lingon versus scheduling events with Automator/AppleScript and iCal? For system-related timed or repeated tasks, I just log onto my admin account (to keep those tasks off my regular calendar) and set up the events in iCal.



[ Reply to This | # ]
Lingon - Use a GUI to create recurring events
Authored by: nmerriam on Apr 21, '08 12:13:05PM

launchd (like cron) doesn't require a user to be logged on in order for tasks to be run.



[ Reply to This | # ]
Lingon - Use a GUI to create recurring events
Authored by: mark hunte on Apr 21, '08 11:04:32AM

Yes, there is a 10.4 version, And a much better version in my opinion.

The 10.5 version is way too Dumbed down.
Which means you can only do simple task
The 10.4 version has more options and an Advance section.





---
mh



[ Reply to This | # ]
Lingon - Use a GUI to create recurring events
Authored by: simonpie on Apr 21, '08 03:41:22PM

I totally agree, the old version was much better and did not require of the user that he quits in order to load a task.

Please Peter Borg, give us an advance mode in lingon !



[ Reply to This | # ]
Lingon - Use a GUI to create recurring events
Authored by: mark hunte on Apr 21, '08 11:18:17AM
To load and unload the Agent, use load and unload.

launchctl load /Library/LaunchAgents/foo.plist

launchctl unload /Library/LaunchAgents/foo.plist

AFAIK the launchctl unload will only be in effect until next logout.
if you want to unload using the this method permanently use the -w option.

launchctl unload -w /Library/LaunchAgents/foo.plist

---
mh

[ Reply to This | # ]