Script
Timer Bundled Scripts
A number of scripts designed to be scheduled with Script
Timer are included with the program.
These include Track Timer, a script for controlling and
scheduling Apple's iTunes application, and several small
related scripts for controlling iTunes. Track Timer is
discussed on a separate page.
Also included are a few sample scripts that you might want
to schedule with the program, or that illustrate its
features. Because Script Timer takes care of all the
scheduling for you, these scripts are very short and
simple. There are scripts to show you how to:
• use a stand alone script (with
parameters)
• record the time accumulated between two or
more events
• script the Finder
• control a third party program
• return data for inclusion in the Script
Timer log file
• use dynamic scheduling (the ability of
Script Timer to schedule a second script on the fly
depending on data sent to it by another scheduled
script)
• use Script Timer to schedule perl
scripts
• use Script Timer to schedule shell
scripts, and
• use Script Timer to schedule an Automator
workflow without running Automator
These sample scripts are provided for purposes of
illustration only. Although they should work as expected on
most systems, they are not guaranteed to function correctly
on all systems.
In addition to the scripts such as Track Timer that come
bundled with Script Timer, upon registering you will
receive at least eight more scripts designed to be run
by Script Timer as a thank you for registering.
Reminder
This very simple script can be used to give yourself a
reminder of things you need to do during the day. If
scheduled with Script Timer, it beeps and displays a dialog
on your computer screen with a customized message at the
scheduled time.
SayIt
This is a variant on the Reminder script. Instead of
displaying a dialog, it speaks the message that you pass to
it.
chronometer
This script can be used to determine the time between two
events and to accumulate time elapsed from a series of
events. For example, schedule this script to run at idle
start and idle end and you can determine for how long you
were idle, or at log in and log out to determine how long
you were logged in. You can create multiple timers as well.
Elapsed time and total elapsed time for a given timer are
returned to the Script Timer log file every time this
script is run by Script Timer.
EmptyTrash
This script can be used to schedule the Finder to empty the
Trash for you. If there is anything in the Trash when this
script is run, a dialog will appear on the screen asking
you if you would like to empty it, and displaying the
number of items and the amount of disk space they take up.
The default answer is "Yes", so if you hit the Return key,
the Trash will be emptied. If you do not respond in 30
seconds, the Trash will also be emptied by default. This is
so that the script will not hang if no one is at the
machine when it runs.
Get Web Page
Use this script to download a given web page on a schedule
using Safari. (Many web pages that display changing data
are set up to refresh themselves from the web server on a
periodic basis. However, using Script Timer gives you
control over when you want to first get the page in the
day. Also, your browser does not need to be running for the
script to work, the script will start it if it is not
running.) You simply pass the URL of the desired web page
to this script as a parameter.
If you are not using Safari, check the AppleScript
Dictionary for the browser that you are using. It should
contain similar commands.
Running Procs
This script is designed to illustrate the return of data
from a script to the scheduling engine for writing to the
Script Timer log file. Whenever it is run it will cause a
list of the currently running Macintosh (i.e. non-unix)
processes to be placed in the log file. An "unwanted names"
list is provided to allow you to exclude the names of some
processes from your return data. Use this script to get a
snapshot of what was running while you were away from your
computer. By using Script Timer's own log file, there is no
need to have the script deal with files on its own.
Dynamic
Scheduler
This bare bones script illustrates the syntax needed in an
AppleScript script to return a new action record to the
Script Timer scheduling engine to allow it to schedule a
new action. Dynamic scheduling allows an AppleScript script
to decide on a future action - what it is and when to
schedule it - during execution of the script.
perl test file.pl
This skeleton perl script shows how to pass parameters to a
perl script.
shelltest1.sh
This skeleton shell script shows how to pass parameters to
a shell script.
test.workflow
This skeleton Automator workflow shows how to schedule a
workflow and pass file paths to it. (File paths are passed
as a comma separated list in the Script Timer "Parameters"
field.)
Registration
Reward Scripts
You will receive a URL and password to access these scripts
upon registering Script Timer.
App Monitor
- can be used to monitor a given application and restart it
if it should crash
change
data file
- used to
automatically change the program's current data file
This allows you to change sets of actions to
schedule automatically. For example, you might have
different sets of actions for different months or seasons.
Check_Mail - can be used to automatically
check for new mail with Apple's 'Mail' program.
Particularly handy for those who connect to the Internet on
a dialup connection as it automatically connects, checks
for new mail, and disconnects.
Download_Script
- uses the popular
Internet engine Interarchy to download files from the
Internet
This is particularly handy for scheduling
downloads of software updates and other larger files while
you are away from your computer.
NOTE: Recent
versions of Interarchy have a scheduling function built in,
but the program must be running to use it.
file backup script
- can be used to do a
scheduled back up of a single file
This is handy for backing up a constantly
changing file, such as the Internet Explorer 'Favorites'
file, which has been known to be spontaneously overwritten
by the default Favorites file by Internet Explorer.
reconnect
airport
- can be used to automatically rejoin a wireless Airport
network after sleep
(In theory this should be taken care of by
the system, but in some cases the system does not do the
reconnect.)
SnoozeAlarm
- provides a "snooze alarm"
function
This script reminds you that its scheduled run
time has passed, then allows you to tell it to remind you
again in any number of minutes if you don't want to heed it
at that time. You can easily add additional statements to
the script to make it more that a simple snooze alarm.
Truncate
Timer Log
- can be used to
automatically trim Script Timer's log file to contain only
the most recent entries
Thanks to Paul Berkowitz for providing the
script that Truncate Timer Log is based on.
Additional
scripts may be supplied to registered users at a future
date.
Top of Page