1

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

0

1 Answer 1

2

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

Not the answer you're looking for? Browse other questions tagged .