Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7057021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:56:11+00:00 2026-05-28T03:56:11+00:00

I have a continous process that collects data, and I want to write the

  • 0

I have a continous process that collects data, and I want to write the data that were collected every hour. Simply, how can I conditionally save data every hour to an .Rdata file.

For context, I collect data in a list, wish to save the list object to an hourly file, remove the list, and rebuild it.

I tried the code below but it did not work:

 if (identical(format(Sys.time(), "%M:%S"), "00:00")) {
      save(twt, file=fname_r)
 }

Any help will be much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:56:12+00:00Added an answer on May 28, 2026 at 3:56 am

    You may be going about this in the wrong way. Not everything is a job for R (given that R really is single-threaded), and scheduling has always been a key operating system task. Use cron, or if you’re on that market-leading OS from the Northwest, look into its scheduling options. Then setup a trivial Rscript file.

    Have the continuous collection process run to collect, and to dump results somewhere, either in ascii or binary. Then have an hourly job collecting the most recent dumps. That can well be done in R once you figured the scheduling out.

    As for the narrower question of deciding whether an hour has passed, use something like

    then <- Sys.time()
    # ... stuff happens ...
    now <- Sys.time()
    if (as.numeric(difftime(now, then, unit="mins") > 60) {
       # .. do stuff
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have no rails environment but I want to use cruisecontrol.rb as my Continous
I'm trying to accomplish the following: Have a thread that reads data from a
I have some basic questions about pyinotify that I can't seem to find the
We have Xserver-less CentOS system for continuous integration. So no UI. I want to
I have several different c# worker applications that run various continuous tasks: sending emails
In using our TeamCity Continuous Integration server we have uncovered some issues that we
Suppose I have a sequence x1,x2,x3.....xn, and I want to find the longest continuous
If I have List<String> text how can I create a sub-list of all continious
If I have an event that happens 15 times a second (numbered 1 -
I've heard more than one person say that if your build process is clicking

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.