Changed day of the month to run peerscrawl.php with a non-default gracetime of 2 months from the 26th to the 25th; translated the script to english
This commit is contained in:
parent
77d8ab3063
commit
f034d57fbc
1 changed files with 6 additions and 6 deletions
|
@ -5,22 +5,22 @@ cd "$basedir/.."
|
|||
resurrfp=".pcresurrectdone"
|
||||
cmdlogfp="peerscrawl.log"
|
||||
logfp="pcloop.log"
|
||||
resdom=26
|
||||
resdom=25 # day of month when (or after when, if it has not been done already) to execute peerscrawl.php with a gracetime of 2 months
|
||||
function log {
|
||||
echo `date "+%Y-%m-%d %H:%M:%S.%N"` "${1}" >> "${logfp}"
|
||||
}
|
||||
while true; do
|
||||
dom=$((`date "+%d"`+0))
|
||||
[ $dom -lt $resdom -a -f "$resurrfp" ] && rm "$resurrfp"
|
||||
if [[ ($dom -ge $resdom ) && !(-f "$resurrfp") ]]; then # usa un gracetime di 2 mesi
|
||||
if [[ ($dom -ge $resdom ) && !(-f "$resurrfp") ]]; then # use a gracetime of 2 months
|
||||
touch "$resurrfp"
|
||||
log "### Eseguo peerscrawl.php con un gracetime di 2 mesi ###"
|
||||
log "### Starting peerscrawl.php with a 2 months gracetime ###"
|
||||
./peerscrawl.php -g 2M -e peerscrawl.exclude &> $cmdlogfp
|
||||
else # use il gracetime di default
|
||||
log "### Eseguo peerscrawl.php con il gracetime di default ###"
|
||||
else # use the default gracetime
|
||||
log "### Starting peerscrawl.php with the default gracetime ###"
|
||||
./peerscrawl.php -e peerscrawl.exclude &> $cmdlogfp
|
||||
fi
|
||||
tail $cmdlogfp >> $logfp
|
||||
log "### Fine ###"
|
||||
log "### THE END ###"
|
||||
done
|
||||
exit 0;
|
||||
|
|
Loading…
Reference in a new issue