I set up RStudio Server on an Amazon EC2 instance, which is charged by the hour. I have to run long jobs overnight on this instance regularly. I would like to stop the EC2 server when my R job is done to avoid charges for the hours I don't use.
How should I go about this?