Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
What's the difference between “Service” and “/etc/init.d/”?

So what are the differences between jobs that are located in /etc/init/, which I call by writing start myJob, versus a service which I call by sudo service aservice reload?


share|improve this question

marked as duplicate by James, Bruno Pereira, Jorge Castro, Takkat, Marco Ceppi Jan 26 '12 at 2:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 2 down vote accepted

A service is a type of job (Jobs are either tasks or services).

From the upstart cookbook:

4.1 Job

A "unit of work" - generally either a "Task" or a "Service". Each Job is defined in a Job configuration file.

4.1.1 Job Types Task Job

A Task Job is one which runs a short-running process, that is, a program which might still take a long time to run, but which has a definite lifetime and end state.

For example, deleting a file could be a Task Job since the command starts, deletes the file in question (which might take some time if the file is huge) and then the delete command ends. Service Job

A Service Job is a long-running (or daemon(3) process). It is the opposite of a Task Job since a Service Job might never end of its own accord.

Examples of Service Jobs are entities such as databases, webservers or ftp servers. Abstract Job

There is one other type of job which has no script sections or exec stanzas. Such abstract jobs can still be started and stopped, but will have no corresponding child process (PID). In fact, starting such a job will result in it "running" perpetually if not stopped by an Administrator. Abstract jobs exist only within Upstart itself but can be very useful. See for example:

Jobs that "Run Forever" Synchronisation

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.