Suppose I have several cron jobs set up to run at the same time: do they execute in parallel or just one after another?
(My case is Debian squeeze with cronjobs put inside /etc/cron.d/mycronjobs).
|
|
|
The tasks listed in cron will run in parallel, just as processes usually do. Theres no way of being sure which will start first, and no way in cron to make sure task A has complete before task B starts. |
|||||||
|
|
For completeness, jobs in e.g. /etc/cron.{hourly,daily,weekly,monthly} are run sequentially. The run-parts script loops over all files in this directory.
So you can use that in combination with a naming convention (similar to the numbering in |
|||||||
|
|
Cron is a daemon (service) that runs continuously; however, it reads crontabs once a minute. The exact sequence in which jobs are executed will depend on the implementation of your systems' crond. The loose files that some distributions put inside /etc/cron.d/ are scanned for their cron timer settings, since these files follow the normal crontab(5) syntax. What order the individual jobs are executed in depends on the schedule you set for them, obviously. |
|||||||
|
|
They will run in parallel. You can use the following methods to run the processes sequentially.
|
|||
|
|