1 |
sim sim, o meu ta igual, mas saca só: |
2 |
|
3 |
---------------8<-------------------- |
4 |
# if there is no touch file, make one then run the scripts |
5 |
if [ ! -e ${LOCKDIR}/cron.$BASE ] |
6 |
then |
7 |
touch ${LOCKDIR}/cron.$BASE |
8 |
|
9 |
set +e |
10 |
for SCRIPT in $CRONDIR/* |
11 |
do |
12 |
if [[ -x $SCRIPT && ! -d $SCRIPT ]]; then |
13 |
$SCRIPT |
14 |
fi |
15 |
done |
16 |
fi |
17 |
---------------8<-------------------- |
18 |
|
19 |
Isso ai é parte do código do script /usr/sbin/run-crons. |
20 |
Ele só executa os scripts dentro dos crondirs se não tiver o |
21 |
${LOCKDIR}/cron.$BASE relacionado. |
22 |
|
23 |
${LOCKDIR} é /var/spool/cron/lastrun |
24 |
$BASE é hourly, daily, weekly ou monthly, ou seja, os 4 arquivos que se |
25 |
dá rm -f no /etc/crontab. |
26 |
|
27 |
Da uma lida no /usr/sbin/run-crons q ti entende melhor. |
28 |
|
29 |
:wq |
30 |
|
31 |
chronos |
32 |
|
33 |
Thiago Lüttig wrote: |
34 |
|
35 |
> ahh beleza.. mas da uma olhada no meu /etc/crontab |
36 |
> |
37 |
> |
38 |
> # for vixie cron |
39 |
> # |
40 |
> # $Header: |
41 |
> /var/cvsroot/gentoo-x86/sys-process/vixie-cron/files/crontab-3.0.1-r4 |
42 |
> ,v 1.1 2005/03/04 23:59:48 ciaranm Exp $ |
43 |
> # |
44 |
> # |
45 |
> |
46 |
> # Global variables |
47 |
> SHELL=/bin/bash |
48 |
> PATH=/sbin:/bin:/usr/sbin:/usr/bin |
49 |
> MAILTO=root |
50 |
> HOME=/ |
51 |
> |
52 |
> # check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly |
53 |
> 0 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly |
54 |
> 1 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily |
55 |
> 15 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly |
56 |
> 30 5 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly |
57 |
> */10 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons |
58 |
> |
59 |
> |
60 |
> On 11/1/05, *Felipe Prenholato* <philipe_rp@×××××××××.br |
61 |
> <mailto:philipe_rp@×××××××××.br>> wrote: |
62 |
> |
63 |
> in /etc/crontab file. |
64 |
> |
65 |
> OBS: this file not is file edited by the command crontab -e. this file |
66 |
> is used only for /etc/cron.* directories. |
67 |
> |
68 |
> One ask. You don't speak portuguese? |
69 |
> |
70 |
> bye |
71 |
> |
72 |
> chronos. |
73 |
> |
74 |
> Thiago Lüttig wrote: |
75 |
> |
76 |
> > How I find the exactly time that some script into |
77 |
> /etc/cron.daily runs ??? |
78 |
> > |
79 |
> > -- |
80 |
> > ______________________________ |
81 |
> > |
82 |
> > Atenciosamente, |
83 |
> > Thiago Lüttig |
84 |
> > |
85 |
> > ______________________________ |
86 |
> |
87 |
> |
88 |
> |
89 |
> |
90 |
> |
91 |
> |
92 |
> _______________________________________________________ |
93 |
> Promoção Yahoo! Acesso Grátis: a cada hora navegada você |
94 |
> acumula cupons e concorre a mais de 500 prêmios! Participe! |
95 |
> http://yahoo.fbiz.com.br/ |
96 |
> |
97 |
> -- |
98 |
> gentoo-user-br@g.o <mailto:gentoo-user-br@g.o> |
99 |
> mailing list |
100 |
> |
101 |
> |
102 |
> |
103 |
> |
104 |
> -- |
105 |
> ______________________________ |
106 |
> |
107 |
> Atenciosamente, |
108 |
> Thiago Lüttig |
109 |
> |
110 |
> ______________________________ |
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
_______________________________________________________ |
118 |
Promoção Yahoo! Acesso Grátis: a cada hora navegada você |
119 |
acumula cupons e concorre a mais de 500 prêmios! Participe! |
120 |
http://yahoo.fbiz.com.br/ |
121 |
-- |
122 |
gentoo-user-br@g.o mailing list |