Provide an R expression to each of the arguments, which are different time periods (minutes, hours, days of the month, months, days of the week), and receive an equivalent cron-expression string in return. See 'arguments' for valid value ranges and 'details' for valid input formats.
r2cron( minutes = 0L:59L, hours = 0L:23L, days_month = 1L:31L, months = 1L:12L, days_week = 1L:7L, clip = FALSE )
Minutes past the hour, integers 0 to 59 inclusive.
Hours on a 24-hour clock, integers 0 to 23 inclusive.
Day number of the month, integers 1 to 31 inclusive.
Month number, integers 1 to 12 inclusive.
Day of the week, integers 1 to 7 inclusive (where Sunday is the first day of the week).
Logical. Copy output to clipboard? Windows, macOS and X11 only. Requires installation of the clipr package.
A character string (copied to the clipboard at the user's discretion).
The time-period arguments default to every unit within that time period, like 'every minute, of every hour, of every day of the month, etc'. The following input formats are acceptable inputs to all the time period arguments:
a single integer value, like
consecutive-integer vectors, like
nonconsecutive, irregularly-spaced integer vectors, like
c(2, 3, 5)
regularly-spaced integer sequences with specified start and end
seq(3, 59, 15) (useful for specifying sequences within
the full time period,'every 15 minutes of the hour starting from minute 3',
like in this example)