Roxen.git/
server/
etc/
modules/
Variable.pmod/
Schedule.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2002-10-09
2002-10-09 16:39:35 by Anders Johansson <anders@roxen.com>
075731cd4a4013436126950cd064779a36ce6a24 (
36
lines) (+
29
/-
7
)
[
Show
|
Annotate
]
Branch:
5.2
Some fixes.
Rev: server/etc/modules/Variable.pmod/Schedule.pike:1.7
124:
else return last + 3600 * vals[1];
-
// Every n:th day at x.
+
mapping m = localtime( last || time(1) ); m->min = m->sec = 0; if( !vals[3] ) {
-
// Every day at x.
+
// Every
n:th
day at x.
+
if (!last)
+
{
for(int i; i<vals[2]; i++) m = next_or_same_time( m, vals[4] ); return mktime(m); }
-
+
else
+
{
for(int i; i<vals[2]; i++)
-
+
m = next_time( m, vals[4] );
+
return mktime(m);
+
}
+
}
+
+
// Every x-day at y.
+
if (!last)
{
-
+
for(int i; i<vals[2]; i++)
+
{
+
m = next_or_same_time( next_or_same_day( m, vals[3]-1, vals[4]+1 ),
+
vals[4], 6*24*3600 );
+
}
+
}
+
else
+
{
+
for(int i; i<vals[2]; i++)
+
{
m = next_or_same_time( next_or_same_day( m, vals[3]-1, vals[4] ), vals[4], 6*24*3600 ); }
-
+
}
return mktime(m); }