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