TimerAt

TimerAt — attaches an event handler to an "at" timer.

Syntax

TimerAt (day, month, year, hour, minute, second, fn)
    

Arguments

day

Restriction on the day of the month (1-31), or nil for none.

month

Restriction on the month of the year (1-12), or nil for none.

year

Restriction on the year (1994-2026), or nil for none.

hour

Restriction on the hour of the day (0-23), or nil for none.

minute

Restriction on the minute in the hour (0-59), or nil for none.

second

Restriction on the second in the minute (0-59), or nil for none.

fn

A function or method call.

Returns

Description

This method sets an at timer that causes the fn function or method to execute at a specific time, or to occur regularly at certain times of the minute, hour, day, month or year. A restriction on a particular attribute of the time will cause the timer to fire only if that restriction is true.

A restriction may be any number in the legal range of that attribute, or a list of numbers in that range. Illegal values for the time will be normalized. For example, a time specified as July 0, 2008 00:00:00 will be treated as June 30, 2008 00:00:00. If nil is specified for any attribute of the time, this implies no restriction and the timer will fire cyclically at every legal value for that attribute.

This method also creates a unique, sequential ID number for the timer, appends that number to the class's ._TimerIDs list, and returns that same timer ID number.