[R-sig-Debian] Run R script at startup

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Tue Jun 18 19:12:15 CEST 2019


On 18 June 2019 at 21:56, Christofer Bogaso wrote:
| I have some R code placed in a script file called 'script.R'
| 
| Now I want this script file should run when my OS Ubuntu 16.04 starts or
| restarts.
| 
| Is there any way to achieve this?

Nothing R-specific here -- one way to execute _any_ script at bootup is (or
maybe, was, as my 19.04 box longer has it) is to add it to /etc/rc.local ---
as the name indicates this is (was?) for local additions.

This whole complex changed a little with the changes between init.d and
systemd so why knowledge may be out of date. Otherwise, you can also try the
(excellent) askubuntu.com variant of stackoverflow.

So I just did and a decent-looking answer spanning many release versions is
https://askubuntu.com/questions/814/how-to-run-scripts-on-start-up

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-SIG-Debian mailing list