cronR | A simple R package for managing your cron jobs | Cron Utils library

 by   kevinushey R Version: Current License: Non-SPDX

kandi X-RAY | cronR Summary

kandi X-RAY | cronR Summary

cronR is a R library typically used in Utilities, Cron Utils, Symfony applications. cronR has no bugs, it has no vulnerabilities and it has low support. However cronR has a Non-SPDX License. You can download it from GitHub.

cronR is a simple R package for managing your cron jobs.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              cronR has a low active ecosystem.
              It has 17 star(s) with 45 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 1 have been closed. On average issues are closed in 266 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of cronR is current.

            kandi-Quality Quality

              cronR has no bugs reported.

            kandi-Security Security

              cronR has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              cronR has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              cronR releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of cronR
            Get all kandi verified functions for this library.

            cronR Key Features

            No Key Features are available at this moment for cronR.

            cronR Examples and Code Snippets

            No Code Snippets are available at this moment for cronR.

            Community Discussions

            QUESTION

            Node cron task not working after app running for a while (node-cron, cronr, timexe)
            Asked 2021-May-31 at 15:00

            I am trying to leave a node application with a cron job running on my laptop and it seems to work if I start the app not long before the job has to actually run. What I mean by this is if, for example, I set a job to run at 2:05 pm and I start the app at 2 pm, it runs fine, but if I start the app at 10 am, I don't know why, the job doesn't run (but the app IS still running) which is weird.

            Does anyone know if locking my macbook (not turning the machine off, of course) or having the app running for a long time (say more than 1-2 hours) does something with node or macOS does something that may be the culprit of my job not running even if the app is still running?

            It's weird because if I start the app just a bit before the job needs to run, everything runs fine, it's like if having the app running for a long time makes the job not work, but the app still runs.

            I'm really confused about this, hope I made myself clear.

            The code, just in case:

            ...

            ANSWER

            Answered 2021-May-02 at 23:32

            Here is a cronjob scheduled to run every minute:

            Source https://stackoverflow.com/questions/67361624

            QUESTION

            How to schedule a cron job once a month, only on a weekday, somewhere between 5-7 days of the first month using CronR?
            Asked 2021-May-05 at 17:01

            I am using cronR to schedule a report that gets sent out once every month. The report shouldn't be sent out on a weekend and should be sent somewhere between the 5th to 7th day of the month, depending on if that day is a weekend. So let's say 5th is a Saturday, and 6th is a Sunday, so the report should get sent out on Monday. Or if 5th is a Sunday, then it should send on the 6th. I'm not sure how possible this is-I also am using cronR so the expressions the package uses seem to be less flexible than other Linix/Unix commands I am seeing as solutions here. Any help would be appreciated.

            ...

            ANSWER

            Answered 2021-May-05 at 17:01

            Most of the conditioning you talk of here (dom 5-7) is not directly supported by the cron scheduler. While I'm not fluent in the cronR package itself (though I am comfortable with cron), I suspect the best path would be to always run it on each of days 5, 6, and 7, and have the R code check your day-of-week conditions.

            For instance, try this function:

            Source https://stackoverflow.com/questions/67405069

            QUESTION

            Schedule a task (update data) each monday in Shiny
            Asked 2021-Jan-22 at 11:44

            I have a dashboard living in a Shiny Server pro that shows different analysis. The data is coming from a long query that takes around 20 minutes to be completed.

            In my current set up, I have a button that updates the data:

            1. queries new data
            2. transforms the data
            3. saves the data in a file .RData
            4. saves the data in a global object (using data <<-)

            Just in case, outside the server and ui functions I have a statement that checks if data object exists. In case that does not exists, it reads the data from the .RData file instead of doing the query again.

            Now I would like to update the data each Monday at 5:00pm (I do not want to open the app and push the button each Monday). I think that the best way to do it is using a cron job using cronR. The code will be located in the app.R outside the server and ui functions. Now I have the following questions:

            1. If I am using Shiny server pro how many times, the app, will create the cron job if it is located in the app.R outside the server and ui functions?
            2. How can I replace the object data in the shiny app? In such a way that if a user open the app on Monday after 5:00 pm the data will be in place, without the need of reading the .RData file and of course not doing the query again.
            3. What is the best practice?
            ...

            ANSWER

            Answered 2021-Jan-21 at 15:04

            I cant't see your point 1. The app will not create the cron job if it is not named "global.R" or "ui.R" or "server.R", I think. Also, you don't have to put your code under the /srv/shiny-server/ directory.

            For your point 2., check the reactiveFileReader function from the shiny library. This function checks a file's last modified time and the file is re-read if changed

            Source https://stackoverflow.com/questions/65826271

            QUESTION

            Crontab R script failing due to import function (Rstudio is closed)
            Asked 2020-Oct-23 at 12:32

            I am trying to run a Rscript using crontab with Rstudio closed and i am getting the following error in the log when the script is ran:

            ...

            ANSWER

            Answered 2020-Oct-23 at 12:32

            function import is from the rio package. Your automated script fails because you did not load that package rio as in library(rio). This could not even have worked in RStudio itself neither if you did not load package rio.

            Source https://stackoverflow.com/questions/64486150

            QUESTION

            Build a cron job running first weekday of every 3 months
            Asked 2020-Feb-08 at 17:53

            I want to develop a cron job in Ubuntu using R with it cronR package. That job would run on the first Sunday of every 3 months (this 3 should be a variable). However the cronR package does not give any such functionality (as far as I know).

            Can anyone give some pointer if it is possible to achieve this using cronR package, or by any other means?

            Thanks,

            ...

            ANSWER

            Answered 2020-Feb-08 at 17:53

            You cannot do that with the semantics of basic Unix cron. At least not as is.

            What you can do, easily, is to have cron call a script daily which then

            • open a small 'state' memory file, can be csv or maybe easiest rds
            • based on the last state, and current date and time, decide whether to run
            • if it runs, update the 'state' file

            Source https://stackoverflow.com/questions/60129416

            QUESTION

            R DESCRIPTION file: is it possible to "conditionally" import packages?
            Asked 2019-Oct-14 at 13:39

            Is it possible to include a "conditional import" in a package's DESCRIPTION file?

            For example, I am developing a package which schedules system tasks. On Windows this is achieved with Task Scheduler and the taskscheduleR package, on unix with the cronR package. So intuitively it would be useful to do something like the following:

            DESCRIPTION

            ...

            ANSWER

            Answered 2019-Oct-14 at 13:39

            I think this might be possible with a configure shell script as described in Writing R Extensions. But I don't have experience doing that. You can also do platform-dependent stuff in your NAMESPACE files (that won't help here, but see the source of base package parallel for an example).

            You could help your users by using that "The R and man subdirectories may contain OS-specific subdirectories named unix or windows." This allows you to have OS-specific code, which could then do the usual check for package availability.

            E.g., in the windows subdirectory, you'd have something like:

            Source https://stackoverflow.com/questions/58377070

            QUESTION

            Correct way to use here package with cronR scheduling
            Asked 2019-Apr-23 at 20:03

            I've been using the here package to make my projects more portable. It works great apart from when I use cronR to schedule some of my scripts. When I run my_script.R from Rstudio I get a message from library(here):

            ...

            ANSWER

            Answered 2018-Oct-12 at 12:06

            If the first line of your #rstats script is wd <- here(), I will come into your lab and SET YOUR COMPUTER ON FIRE.

            Learn how to use environment variables

            Source https://stackoverflow.com/questions/52775824

            QUESTION

            Relative paths in R: how to avoid my computer being set on fire?
            Asked 2018-Dec-18 at 21:16

            A while back I was reading an article about improving project workflow. The advice was not to use setwd or my computer would burn:

            If the first line of your R script is

            setwd("C:\Users\jenny\path\that\only\I\have")

            I will come into your office and SET YOUR COMPUTER ON FIRE .

            I started using the here package and it worked great until I started to schedule scripts using cronR. After asking this question my laptop was again threatened with arson:

            If the first line of your #rstats script is wd <- here(), I will come into your lab and SET YOUR COMPUTER ON FIRE.

            Fearing for my laptop's safety I started using the method suggested in the answer to get relative file paths:

            ...

            ANSWER

            Answered 2018-Nov-22 at 17:03

            There are many ways to organize code and data for use with R. Given that the "arsonist" described in the OP has rejected at least two approaches for locating the project files in an R script, the best next step is to ask the arsonist how s/he performs this function, and adjust your code and file structures accordingly.

            UPDATE: Since the "arsonists" appear to be someone who writes on Tidyverse.org (see Tidyverse article in OP) and an answer on SO (see additional links in OP), your computer appears to be relatively safe.

            If you are sharing code or executing it with batch processes where the "user" is someone other than you, a useful approach is to place the code, data, and configuration under version control, and develop a runbook to explain how others can retrieve the components and execute them on another computer.

            As noted in the comments to the OP, there's nothing wrong with here::here() if its use can be made reliable through documentation in a runbook.

            I structure all of my R code into Projects within RStudio, which are organized into a gitrepositories directory. All of the projects can be accessed as subdirectories from the gitrepositories directory. If I need to share a project, I make the project accessible to other users on GitHub.

            In my R code I reference external files as subdirectories from the project root directory, such as ./data/gen01.csv.

            Source https://stackoverflow.com/questions/53433955

            QUESTION

            R plumber on Linux Server
            Asked 2017-Nov-16 at 18:56

            I've made a .R file with a plumber code. The file works fine on my local pc, it works also fine on my linux server. My only problem now is, that it's only local.

            I need to be able to get the API over the server adress. The server also runs a cronR process which makes all the math and a shiny-app to display some graphs. All the math is stored into an cvs file and plumber should now get the last index and display this so I can use it from everywhere.

            Are there any solutions?

            Code:

            ...

            ANSWER

            Answered 2017-Nov-16 at 18:56

            QUESTION

            Cron job for an R script failing
            Asked 2017-Aug-05 at 06:14

            My R script works as intended when I run it on its own, but when I try to run it as a cron job, it keeps failing saying

            ...

            ANSWER

            Answered 2017-Aug-05 at 06:14

            Sounds like you are trying to do something that can only be run in RStudio. Maybe one of you functions is trying to call a fucntion that can only be run in RStudio, for example one of the functions from here?

            In that case, as suggested here, you can make the behavior of your script dependent on whether it's run in Rstudio or not. That can be achieved with the following line:

            Source https://stackoverflow.com/questions/45518592

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install cronR

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/kevinushey/cronR.git

          • CLI

            gh repo clone kevinushey/cronR

          • sshUrl

            git@github.com:kevinushey/cronR.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Cron Utils Libraries

            cron

            by robfig

            node-schedule

            by node-schedule

            agenda

            by agenda

            node-cron

            by kelektiv

            cron-expression

            by mtdowling

            Try Top Libraries by kevinushey

            rex

            by kevinusheyR

            RcppRoll

            by kevinusheyC++

            sourcetools

            by kevinusheyC++

            configure

            by kevinusheyR

            Kmisc

            by kevinusheyR