Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

136
Visualizações
Can anyone help me with this crontab?

We want to download the stock price of Tesla every day, using the package "quantmod" in R. We managed to write the function that downloads the last available stock and store it in a database in SQL: indeed, if we run the function manually, we can see the table with the stock price of today. However, if we let it run alone with crontab, it doesn't work: we set it up on the 14th, and as of today, it only downloaded the price of the 18th. This is how we set up the crontab:

# m h dom mon dow user1 command

59 23 * * 1-5 /usr/bin/Rscript /home/project/daily.R

Anyone? I'm sure it's a stupid mistake but it doesn't work and I need it to work by the end of the week

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You can schedule cron jobs with package cronR.

library(cronR)

f <- "/home/project/daily.R"
cmd <- cron_rscript(f)
cmd <- cron_add(
  command = cmd,
  frequency = "59 23 * * 1-5"
)
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda