[R-sig-Debian] running a script repeatedly

Dirk Eddelbuettel edd at debian.org
Thu Mar 24 13:11:07 CET 2011


On 23 March 2011 at 22:39, Hodgess, Erin wrote:
| Is there a way to run a little script (on Ubuntu Manic Meerkat) every hour, please?
| 
| I know that this is more of a LINUX/UNIX question rather than an R question.  Sorry.

You may want to get yourself familiar with a basic Unix book like the
fifteen+ year old copy of Running Linux I have here---looks like it devotes
five very clear pages to this in the chapter 'Essential Administration'.

In short, your system does not care if its R or any other program. You just
schedule an application to run.  That is done via cron, so do (as was already
recommended)

	man 8 cron
	man 5 crontab

and these days you can even scripts into

        /etc/cron.daily/
        /etc/cron.hourly/
        /etc/cron.monthly/
        /etc/cron.weekly/

For what it is worth, my /etc/crontab here has 

# every few hours, run cranberries
16 * * * *   	edd     cd /home/edd/cranberries && ./cranberries.r

and the comment dates from when I ran that every four or six hours -- now it
runs hourly on the 16th minute to produce what you see at the CRANberries
pages (http://dirk.eddelbuettel.com/cranberries/) --- the 16th minute of
every (*) hour, day, month, dayofweek.

With that please don't abuse this R/Debian/Ubuntu list with questions you
should really be able to answer yourself, or get answered on an Ubuntu newbie
list or forum.

Dirk


     

| 
| Thanks,
| Erin
| 
| 
| Erin M. Hodgess, PhD
| Associate Professor
| Department of Computer and Mathematical Sciences
| University of Houston - Downtown
| mailto: hodgesse at uhd.edu
| 
| 
| 	[[alternative HTML version deleted]]
| 
| _______________________________________________
| R-SIG-Debian mailing list
| R-SIG-Debian at r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-debian

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



More information about the R-SIG-Debian mailing list