Coder Social home page Coder Social logo

lisali525 / task-schedule-automation Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 6 KB

Automate R script execution with this script using the `taskscheduleR` package. Schedule one-time or recurring tasks, create examples, and easily manage them. Streamline your task scheduling for efficient R script automation.

R 100.00%
automation reporting task-scheduler r-scripts

task-schedule-automation's Introduction

Task Schedules Management

This R script utilizes the taskscheduleR package to manage and schedule recurring tasks in a Windows environment. It sets up tasks for running R scripts at specified intervals using the Windows Task Scheduler.

Prerequisites

Make sure to install the required R package before running the script:

install.packages("taskscheduleR")

Task Schedule Creation

The script includes code for creating various scheduled tasks:

  1. One-Time Daily Task
    • Task Name: Schedule_Task_Daily
    • Execution: Once, scheduled for 1 minute from the current time.
    • R Script: Scheduled_Report_Daily.R
taskscheduler_delete(taskname = "Schedule_Task_Daily")
runon <- format(Sys.time() + 60, "%H:%M")
taskscheduler_create(taskname = "Schedule_Task_Daily", rscript = "C:/Users/example/Desktop/R_Schedule_Reports/Scheduled_Report_Daily.R", 
 schedule = "ONCE", starttime = runon)
  1. One-Time Weekly Task
    • Task Name: Schedule_Task_Weekly
    • Execution: Once, scheduled for 2 minutes from the current time.
    • R Script: Scheduled_Report_Weekly.R
taskscheduler_delete(taskname = "Schedule_Task_Weekly")
runon <- format(Sys.time() + 120, "%H:%M")
taskscheduler_create(taskname = "Schedule_Task_Weekly", rscript = "C:/Users/example/Desktop/R_Schedule_Reports/Scheduled_Report_Weekly.R", schedule = "ONCE", starttime = runon)
  1. Daily Scheduled Task
    • Task Name: Daily_Schedule_Task
    • Execution: Daily at 08:50, starting from tomorrow.
    • R Script: Scheduled_Report_Daily.R
taskscheduler_create(taskname = "Daily_Schedule_Task", rscript = "C:/Users/example/Desktop/R_Schedule_Reports/Scheduled_Report_Daily.R", 
 schedule = "DAILY", starttime = "08:50", startdate = format(Sys.Date() + 1, "%d/%m/%Y"))

Note

Replace sensitive information such as file paths, task names, and execution times with your actual data before running the script. Ensure that the specified R scripts exist in the provided paths.

In this README, replace instances of "example" with your actual company details, and ensure that the specified R scripts exist in the provided paths before running the script.

task-schedule-automation's People

Contributors

lisali525 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.