Represents a single entry from the cron
section of mascot.dat
.
More...
#include <ms_cronoptions.hpp>
List of all members.
Public Member Functions |
| ms_cronjob () |
| Default constructor.
|
| ms_cronjob (const ms_cronjob &src) |
| Copying constructor.
|
| ~ms_cronjob () |
| Default destructor.
|
void | copyFrom (const ms_cronjob *right) |
| Can be used to create a copy of another object.
|
void | defaultValues () |
| Initialises the instance with default values.
|
std::string | getCommandStr () const |
| Returns a string that is executed by the shell (command prompt) at the specified times.
|
bool | isDayOfMonth (const int day) const |
| Returns TRUE for a valid day number, FALSE otherwise.
|
bool | isDayOfWeek (const int day) const |
| Returns TRUE for a valid day of week number, FALSE otherwise.
|
bool | isEnabled () const |
| Returns true if the cron job is enabled.
|
bool | isHour (const int hour) const |
| Returns TRUE for a valid hour number, FALSE otherwise.
|
bool | isMinute (const int min) const |
| Returns TRUE for a valid minute number, FALSE otherwise.
|
bool | isMonthOfYear (const int month) const |
| Returns TRUE for a valid month number, FALSE otherwise.
|
ms_cronjob & | operator= (const ms_cronjob &right) |
| Assignment operator for C++ client applications.
|
void | setCommandStr (const char *str) |
| Set the command that is executed by the shell (command prompt) at the specified times.
|
void | setDayOfMonth (const int day, const bool value) |
| Set valid/illegal days.
|
void | setDayOfWeek (const int day, const bool value) |
| Set valid/illegal days.
|
void | setEnabled (const bool enabled) |
| Set the flag for determining if the cron job is enabled or disabled.
|
void | setHour (const int hour, const bool value) |
| Set valid/illegal hours.
|
void | setMinute (const int min, const bool value) |
| Set valid/illegal minutes.
|
void | setMonthOfYear (const int month, const bool value) |
| Set valid/illegal months.
|
Detailed Description
Represents a single entry from the cron
section of mascot.dat
.
Instances of this class can be stored in ms_cronoptions.
Member Function Documentation
std::string getCommandStr |
( |
) |
const |
Returns a string that is executed by the shell (command prompt) at the specified times.
By default this is empty.
- Returns:
- the command to be run.
- Examples:
- config_mascotdat.cpp.
bool isDayOfMonth |
( |
const int |
day ) |
const |
Returns TRUE for a valid day number, FALSE otherwise.
A cron job entry in the configuration file specifies time to run a command. Use this function to retrieve the 'day' part of this specification.
- Parameters:
-
- Returns:
- By default FALSE is returned for all days.
bool isDayOfWeek |
( |
const int |
day ) |
const |
Returns TRUE for a valid day of week number, FALSE otherwise.
A cron job entry in the configuration file specifies time to run a command. Use this function to retrieve the 'day of week' part of this specification.
- Parameters:
-
day | a day of week number (0..6, 0=Sunday). |
- Returns:
- By default FALSE is returned for all days.
Returns true if the cron job is enabled.
A cron job entry in the configuration file specifies time to run a command. The entry can be disabled by putting a comments symbol # at the start of the line
- Returns:
- true if the cron job is enabled.
bool isHour |
( |
const int |
hour ) |
const |
Returns TRUE for a valid hour number, FALSE otherwise.
A cron job entry in the configuration file specifies time to run a command. Use this function to retrieve the 'hour' part of this specification.
- Parameters:
-
hour | an hour number (0..23). |
- Returns:
- By default FALSE is returned for all hours.
bool isMinute |
( |
const int |
min ) |
const |
Returns TRUE for a valid minute number, FALSE otherwise.
A cron job entry in the configuration file specifies time to run a command. Use this function to retrieve the 'minute' part of this specification.
- Parameters:
-
min | a minute number (0..59). |
- Returns:
- By default FALSE is returned for all minutes.
bool isMonthOfYear |
( |
const int |
month ) |
const |
Returns TRUE for a valid month number, FALSE otherwise.
A cron job entry in the configuration file specifies time to run a command. Use this function to retrieve the 'month' part of this specification.
- Parameters:
-
month | a month number (1..12). |
- Returns:
- By default FALSE is returned for all months.
void setCommandStr |
( |
const char * |
str ) |
|
Set the command that is executed by the shell (command prompt) at the specified times.
- Parameters:
-
str | is the new command to be run. |
void setDayOfMonth |
( |
const int |
day, |
|
|
const bool |
value |
|
) |
| |
Set valid/illegal days.
- See also:
- isDayOfMonth()
- Parameters:
-
day | an hour number (1..31). |
value | a new boolean flag for the given day. |
void setDayOfWeek |
( |
const int |
day, |
|
|
const bool |
value |
|
) |
| |
Set valid/illegal days.
- See also:
- isDayOfWeek()
- Parameters:
-
day | a day of week number (0..6, 0=Sunday). |
value | a new boolean flag for the given day. |
void setEnabled |
( |
const bool |
enabled ) |
|
Set the flag for determining if the cron job is enabled or disabled.
A cron job entry in the configuration file specifies time to run a command. The entry can be disabled by putting a comments symbol # at the start of the line
- Parameters:
-
enabled | true if the cron job is enabled. |
void setHour |
( |
const int |
hour, |
|
|
const bool |
value |
|
) |
| |
Set valid/illegal hours.
- See also:
- isHour()
- Parameters:
-
hour | an hour number (0..23). |
value | a new boolean flag for the given hour. |
void setMinute |
( |
const int |
min, |
|
|
const bool |
value |
|
) |
| |
Set valid/illegal minutes.
- See also:
- isMinute()
- Parameters:
-
min | a minute number (0..59) |
value | a new boolean flag for the given minute |
void setMonthOfYear |
( |
const int |
month, |
|
|
const bool |
value |
|
) |
| |
Set valid/illegal months.
- See also:
- isMonthOfYear()
- Parameters:
-
month | a month number (1..12). |
value | a new boolean flag for the given month. |
The documentation for this class was generated from the following files: