Thank you for this package. I've found a bug when adding a monthly job.
The following code produces a cronjob with schedule 0 6 4 * 1 which will run only if the fourth day of the month is Monday:
library(cronR)
cron_add(command = 'echo test',
frequency = 'monthly',
at = '06:00',
days_of_month = 'fourth',
id = 'test job',
dry_run = TRUE,
ask = FALSE
)
At your own risk: will set the cron schedule as is: '0 6 4 * *'
Adding cronjob:
---------------
## cronR job
## id: test job
## tags:
## desc:
0 6 4 * * echo test
Thank you for this package. I've found a bug when adding a monthly job. The following code produces a cronjob with schedule
0 6 4 * 1
which will run only if the fourth day of the month is Monday:Result:
Workaround:
Result: