Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

Thanks

share|improve this question

marked as duplicate by jrg, 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.

1 Answer 1

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

4.1.1.1 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.

4.1.1.2 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.

4.1.1.3 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.