Fact: If you use
start on <event> for a job, your job might be run every time
The upstart cookbook mentions two methods to run a job only once.
The first is logical to me, and involves creating a dummy run-forever job that is started on
<event>. Since that dummy job is run-forever, and single-instance, it will get started only once and you can use
start on started <dummy-job> in your actual job.
The second method looks a lot simpler:
start on startup and <event>. The purpose of this question is to understand why this second method works. This has to do with understanding how
on start handles events compounded by
and. I.e., since
<event> occurs multiple times, why is it that the compounded event is triggered only once? Could it be that a compounded event is re-triggered only after both
<event> are re-triggered? I'm looking for a confirmation of this.