Starting and stopping services at specific times using Upstart
tomh0665 at gmail.com
Sat Feb 28 16:28:27 UTC 2015
On Thu, Feb 26, 2015 at 10:43 AM, Andrew Langhorn <andrew at ajlanghorn.com> wrote:
> I have a service which is managed using Upstart, and I would like to start
> and stop this service at specific times. The machine on which the service
> runs is managed by Puppet.
> Whilst I could use Cron for this, I wondered if similar was possible with
> Upstart? For instance, given two times, the service name and the action,
> ensure that the service isn't running between those two times.
> Is this possible, or is it going to be better to use Cron and work through
> any additional headaches Puppet throws at me?
I've never seen any "start on <time>" or "stop on <time>" capabilities
in upstart so you should use cron; at least until 15.04 (or 16.04 if
you use LTS) where you'll be able to use systemd timer units.
More information about the ubuntu-users