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


Click here to return to the 'An AppleScript to periodically check all IMAP folders' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to periodically check all IMAP folders
Authored by: jspahr on Jan 21, '04 11:18:49AM

I use the following script:

[code]

tell application "System Events"
set procCount to name of every process whose name is "Mail"
end tell

if procCount is {"Mail"} then

tell application "Mail"
synchronize with account "Spahr Panix"
end tell

end if

[/code]

It is run from the unix crontab like so:

[code]
*/20 * * * * /usr/bin/osascript /path/to/Mail_Sync.scpt
[/code]

so it runs every 20 minutes, only if Mail is running.



[ Reply to This | # ]
An AppleScript to periodically check all IMAP folders
Authored by: jaysoffian on Jan 21, '04 12:09:29PM

I have over 10,000 messages across my two IMAP accounts. Synchronizing takes well over 10 minutes per account. I wouldn't want to do that periodically. Setting the account offline/online ONLY updates the message counts.



[ Reply to This | # ]
An AppleScript to periodically check all IMAP folders
Authored by: applesjgtl on Aug 30, '08 01:16:18AM
I'm trying to write a script to launch Adium upon launching iChat, so I modified your AppleScript to do so. Now I would like to add it to the UNIX crontab. Can you explain how, and in what program, is this done? Is it done in Terminal? When I entered your code (the second piece) into terminal, it gave me an error.
    What am I doing wrong?
And yes, I did adjust the path and name to fit my script.

[ Reply to This | # ]
An AppleScript to periodically check all IMAP folders
Authored by: applesjgtl on Aug 30, '08 01:20:36AM
oh, also I would like to shorten the periodic checks to 2 minutes apart. My script is as follows. tell application "System Events" set procCount to name of every process whose name is "iChat" end tell if procCount is {"iChat"} then delay 45 tell application "Adium" to run delay 15 tell application "Adium" to quit else end if

[ Reply to This | # ]