GithubHelp home page GithubHelp logo

schedule-shopify's Introduction

schedule-shopify

This is a simple package based on shopify-api-node to schedule product price updates in shopify

Easily create a cron job to run as frequent you would like and it will check the json file and run necessary updates. If cron finds job that is scheduled to run within 3 minutes it will run the update. It will of course run any update that was supposed to be ran already. So the accuracy of the cron is determined by when you schedule and how often cron.js is ran.

NOTE: This package will create a jsonfile with your shopify credentials for cron job, if you feel like that is not good enough please feel free to help, as I have not bothered yet.

Install

$ npm install --save schedule-shopify

Usage

const ScheduleShopify = require('schedule-shopify');

const Schedule = ScheduleShopify({
  shopName: shopName,
  apiKey: apiKey,
  password: password
})


let productSchedule = await Schedule.add({
  product: Shopify-Id,
  time: `10/24/2017T12:28:00`,
  price: price,
  priceCompare: priceCompare
})
//=> {status, err}

let scheduleList = await Schedule.list({limit: 10})
//=> list of 10 schedules

let removeSchedule = await Schedule.del(8)
//=> {status, err}

CRON

Example

$ node ./node_modules/schedule-shopify/cron.js

Cron will update any price where current time is after schedules time + 3 minutes

schedule-shopify's People

Contributors

dghaehre avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.