
scheduleCommand — schedule a new alarm which executes a shell command.
bool scheduleCommand(const QString&commandLine, const QString&dateTime, intlateCancel, intflags, const QString&recurrence, intsimpleRepeatInterval, intsimpleRepeatCount)
bool scheduleCommand(const QString&commandLine, const QString&dateTime, intlateCancel, intflags, intrecurType, intrecurInterval, intrecurCount)
bool scheduleCommand(const QString&commandLine, const QString&dateTime, intlateCancel, intflags, intrecurType, intrecurInterval, const QString&endDateTime)
commandLineSpecifies the command whose execution is to be scheduled. The
flags parameter indicates whether this
parameter contains a shell command line or a command script.
dateTimeSpecifies the scheduled date, or date and time, at which the
command should be executed. For a date-only alarm, the string should
be in the format “YYYY-MM-DD” (as returned by
QDate::toString(Qt::ISODate)). For an alarm
with a date and time, the string should be in the format
“YYYY-MM-DDTHH:MM[:SS]” (as returned by
QDateTime::toString(Qt::ISODate)) or
“HH:MM[:SS]” (as returned by
QTime::toString(Qt::ISODate)). If no date is
specified, today's date is used. Note that any seconds value is
ignored.
lateCancelCauses the alarm to be canceled if it cannot be triggered within the specified number of minutes after the alarm's scheduled time. If the value is 0, the alarm will not be canceled no matter how late it is triggered.
flagsSpecifies the logical OR of the desired alarm flags. The flag
bits are those defined in class KAlarmIface in
kalarmiface.h. Note that not all flag bits are
applicable to command alarms.
recurrenceSpecifies a regular recurrence for the alarm, using iCalendar syntax as defined in RFC2445. For example, “FREQ=MONTHLY;COUNT=4;INTERVAL=3;BYDAY=-1MO” would specify 4 repetitions at 3-monthly intervals on the last Monday of the month. For a non-recurring alarm, specify an empty string.
recurTypeSpecifies the recurrence type for the alarm. The permissible
values are MINUTELY, DAILY, WEEKLY, MONTHLY, YEARLY. These
are defined in class KAlarmIface in
kalarmiface.h. Monthly recurrences are of the
day of the month type, and yearly recurrences are of the date in
the year type, with the date in both cases taken from the
dateTime parameter.
recurIntervalSpecifies the number of periods
(minutes/days/weeks/months/years as specified by
recurType) between recurrences of the
alarm.
recurCountSpecifies the number of times that the alarm should be repeated. Specify -1 to repeat the alarm indefinitely.
endDateTimeSpecifies the end date, or date and time, for recurrences of the
alarm. If dateTime includes a time, this
parameter must also include a time; if dateTime
contains only a date, this parameter must also contain only a
date.
simpleRepeatIntervalSpecifies the number of minutes between simple repetitions of the alarm. Specify 0 for no simple repetition.
simpleRepeatCountSpecifies the number of simple repetitions of the alarm, including the initial occurrence.
scheduleCommand() is a DCOP call to
schedule the specified shell command line, or command script, for
execution at the specified date and time. Apart from specifying a
command and omitting the message color, font and audio file
parameters, its usage is identical to
scheduleMessage
- see the description of that function for further details.
Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team