|
|
|
|
||||||
| linux.debian.user debian-user@lists.debian.org. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello all,
I have a question about cron and anancron. After reading the man page for both cron/crontab and anacron/ anacrontab, it's not clear to me how to configure for the following: --jobs to run currently live in /etc/crontab --jobs need to run serially (hence the staggered start times in crontab) As I understand it, anacron will only run those jobs created as scripts in the **ly folders (e.g. /etc/cron.weekly). So, my question is this: if I have periodic jobs to run in /etc/ crontab, how do I have anacron run those jobs when cron fails to do so (e.g. machine turned off)? It seems to me that the only way anacron will do what I expect it to do is to move my jobs in /etc/crontab into /etc/cron.daily. Yet, if I do that, I lose the ability to have jobs run serially (or at least run the risk of having jobs overlap each other). Please advise. Thanks. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Thu, Mar 08, 2007 at 09:15:12AM -0800, richbl wrote:
> Hello all, > > I have a question about cron and anancron. > > After reading the man page for both cron/crontab and anacron/ > anacrontab, it's not clear to me how to configure for the following: > > --jobs to run currently live in /etc/crontab > --jobs need to run serially (hence the staggered start times in > crontab) > > As I understand it, anacron will only run those jobs created as > scripts in the **ly folders (e.g. /etc/cron.weekly). > > So, my question is this: if I have periodic jobs to run in /etc/ > crontab, how do I have anacron run those jobs when cron fails to do so > (e.g. machine turned off)? > > It seems to me that the only way anacron will do what I expect it to > do is to move my jobs in /etc/crontab into /etc/cron.daily. Yet, if I > do that, I lose the ability to have jobs run serially (or at least run > the risk of having jobs overlap each other). I can't answer your cron/anacron questions directly, but why not just wrap your cron jobs in a script that runs them sequentially? then you can just run that script from cron/anacron and not worry about it. .02 A -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF8E5paIeIEqwil4YRAjjLAJ9viX4cSK/AdsQQTnaMSJUYBZuMsQCg1lLr p2nwZLiAwVq1wEp5/EPSzdg= =P1Qy -----END PGP SIGNATURE----- |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
> > I have a question about cron and anancron. > > > > After reading the man page for both cron/crontab and anacron/ > > anacrontab, it's not clear to me how to configure for the following: > > > > --jobs to run currently live in /etc/crontab > > --jobs need to run serially (hence the staggered start times in > > crontab) > > > > As I understand it, anacron will only run those jobs created as > > scripts in the **ly folders (e.g. /etc/cron.weekly). not only, you can run a script from anywhere by editing /etc/anacrontab (see man anacrontab) > > > > So, my question is this: if I have periodic jobs to run in /etc/ > > crontab, how do I have anacron run those jobs when cron fails to do so > > (e.g. machine turned off)? use cron _or_ anacron, not both! > > It seems to me that the only way anacron will do what I expect it to > > do is to move my jobs in /etc/crontab into /etc/cron.daily. Yet, if I > > do that, I lose the ability to have jobs run serially (or at least run > > the risk of having jobs overlap each other). jobs in /etc/cron.daily are run one by one in lexicographic order, so you just have to prepend their name with a number (01first_script, 02second_script...) to order them (see man run-parts) > > I can't answer your cron/anacron questions directly, but why not just > wrap your cron jobs in a script that runs them sequentially? then you > can just run that script from cron/anacron and not worry about it. > seems to be a good solution too -- Cédric Lucantis |
|
![]() |
| Outils de la discussion | |
|
|