25 lines
1,007 B
Java
25 lines
1,007 B
Java
|
|
package it.acxent.cc;
|
||
|
|
|
||
|
|
import it.acxent.common.CrontabInterface;
|
||
|
|
import it.acxent.db.ApplParmFull;
|
||
|
|
import it.acxent.db.DBAdapter;
|
||
|
|
import it.acxent.db.ResParm;
|
||
|
|
|
||
|
|
public class CCCronImportIngramMicroDispo implements CrontabInterface {
|
||
|
|
public ResParm crontabJob(ApplParmFull ap) {
|
||
|
|
ResParm rp = new ResParm(true);
|
||
|
|
StringBuffer msg = new StringBuffer("\n################# Inizio crontab Import Ingrammicro DISPO CC (" +
|
||
|
|
DBAdapter.getNow().toString() + ")\n#################");
|
||
|
|
long t0 = System.currentTimeMillis();
|
||
|
|
CCImport ccImport = new CCImport();
|
||
|
|
rp = ccImport.startImportIngramMicro(ap, 1L, true);
|
||
|
|
msg.append(rp.getMsg());
|
||
|
|
msg.append("\n################# Fine crontab Import Ingrammicro DISPO CC (" +
|
||
|
|
DBAdapter.getNow().toString() + ")\n#################");
|
||
|
|
long tn = System.currentTimeMillis();
|
||
|
|
long duration = (tn - t0) / 60000L;
|
||
|
|
msg.append("Durata aggiornamento: " + duration + " minuti.\n");
|
||
|
|
rp.setMsg(msg.toString());
|
||
|
|
return rp;
|
||
|
|
}
|
||
|
|
}
|