When I try to feed my current environment variables to cron_add, as suggested by your documentation, like this:
library(cronR)
f <- base::system.file("scripts/my_cron_job.R", package = "mypackage")
cmd <- cron_rscript(f)
cron_add(command = cmd,
frequency = 'minutely',
id = 'test1',
description = 'Minute scrape',
tags = c('lab', 'xyz'),
env = Sys.getenv())
I get the following error:
"/var/folders/v6/8rv32yhn4cz0x_gnk0kvb8jr0000gn/T//RtmpA631WG/filea7f66a543048":32: bad minute
crontab: errors in crontab file, can't install
Simply removing the env argument, everything works fine. But I need to feed my environment variables in. Did I misunderstand your documentation/is what I am trying to do possible?
When I try to feed my current environment variables to
cron_add
, as suggested by your documentation, like this:I get the following error:
Simply removing the env argument, everything works fine. But I need to feed my environment variables in. Did I misunderstand your documentation/is what I am trying to do possible?