Mac os x server cron plist load unload mod#
The script could be a little more succinct, but at least its relatively easy to read and mod if desired. Great hint! I played around with this a little as we're just getting our twittering rolling over at liketribe, and derived the following shell script that would update your Adium and Skype status from twitter even if your twitter updates are protected, plus a plist to go with it. Thanks, John.įor more help with this script, please see the original post on my blog. This script was inspired by a similar script by John Nunemaker over at. If you want to update Facebook too, you'll have to add the Twitter application to Facebook itself.
![mac os x server cron plist load unload mac os x server cron plist load unload](https://eclecticlightdotcom.files.wordpress.com/2021/09/launchd1.jpg)
![mac os x server cron plist load unload mac os x server cron plist load unload](https://www.launchd.info/img/Troubleshooting_DoesNotStart.png)
Wait a little bit and it'll update, or if you like, run it immediately from Terminal ( ~/Library/Scripts/sync-status-with-twitter.rb). Hold down shift and press ZZ (Z key twice) to save and quit.0 */2 * * * - Every second hour, on the hour.*/30 * * * * ~/Library/Scripts/sync-status-with-twitter.rb Add a line to crontab to run the script regularly:.Open Terminal (in Applications » Utilities), and make the script executable: chmod +x ~/Library/Scripts/sync-status-with-twitter.rb.
![mac os x server cron plist load unload mac os x server cron plist load unload](https://usermanual.wiki/Apple/MacOSXServerearly.776864261-User-Guide-Page-19.png)
Open it in, say, TextEdit and replace MyUserName at the top of the file to your actual Twitter username.#!/usr/bin/env ruby# Update iChat/Adium status from Twitter# Michael Tyson # Set Twitter username hereUsername = 'MyUserName'require 'net/http'require 'rexml/document'# Download timeline XML and extract latest entryurl = "" + Username + ".atom"xml_data = Net::HTTP.get_response(URI.parse(url)).bodydoc = REXML::Document.new(xml_data)latest = (/^+:\s*/, '')exit if ! message# Apply to statusscript = 'set message to "' + message.gsub(/"/, '\\"') + "\"\n" + 'tell application "System Events"' + "\n" + 'if exists process "iChat" then tell application "iChat" to set the status message to message' + "\n" + 'if exists process "Adium" then tell application "Adium" to set status message of every account to message' + "\n" + 'end tell' + "\n"IO.popen("osascript", "w")