tripGrouping 2 month
This commit is contained in:
@ -162,9 +162,9 @@ async function job() {
|
|||||||
|
|
||||||
async function tripGrouping() {
|
async function tripGrouping() {
|
||||||
console.log("Trip grouping job executed:", moment().format("YYYY-MM-DD HH:mm:ss"))
|
console.log("Trip grouping job executed:", moment().format("YYYY-MM-DD HH:mm:ss"))
|
||||||
for (let i = 0; i <= 12; i++) {
|
for (let i = 0; i <= 1; i++) {
|
||||||
const lasYearDate = moment().subtract(1, "years")
|
const lastMonth = moment().subtract(1, "months")
|
||||||
const histMonth = lasYearDate.clone().add(i, "months")
|
const histMonth = lastMonth.clone().add(i, "months")
|
||||||
const histYy = histMonth.format("YY")
|
const histYy = histMonth.format("YY")
|
||||||
const histMm = histMonth.format("MM")
|
const histMm = histMonth.format("MM")
|
||||||
const histTableName = `tracks_${histYy}${histMm}`
|
const histTableName = `tracks_${histYy}${histMm}`
|
||||||
|
|||||||
Reference in New Issue
Block a user