Skip to content

Commit

Permalink
fix(cron-events): event price all time
Browse files Browse the repository at this point in the history
  • Loading branch information
wisley7l committed Aug 13, 2024
1 parent 92d4f6f commit dc08eed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions functions/lib/cron-events-horus.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,14 @@ module.exports = async (appSdk) => {
console.log('>> Horus API', isHorusApiOk ? 'OK' : 'OffLine')
if (isHorusApiOk) {
promises.push(productsStocksEvents(horus, storeId, opts))
const now = new Date()
console.log(`horas : ${now.getHours() - 3}`)
if ((now.getHours() - 3) === 12 && now.getMinutes() % 5 === 0) {
// console.log(`horas : ${now.getHours() - 3}`)
// if ((now.getHours() - 3) === 12 && now.getMinutes() % 5 === 0) {
// if (now.getMinutes() % 10 === 0) {
// run at 3 am (UTC -3) everyday
promises.push(productsPriceEvents(horus, storeId, opts))
}
// run at 3 am (UTC -3) everyday
promises.push(productsPriceEvents(horus, storeId, opts))
// }

const now = new Date()
if (now.getMinutes() % 30 === 0) {
// new Product
// run at 30 in 30min
Expand Down

0 comments on commit dc08eed

Please sign in to comment.