Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    albertdatui
    @albertdatui
    you can use that
    plexigras
    @plexigras
    is there something like node-schedule i can use in the browser
    Santiago Gimeno
    @santigimeno
    haven't tried it, but browserifying node-schedule will probably work
    plexigras
    @plexigras
    tried it and it dint work
    Santiago Gimeno
    @santigimeno
    what failures did you got?
    plexigras
    @plexigras
    i dint got a error msg it just dint work
    i probably did something wrong
    Santiago Gimeno
    @santigimeno
    I have just tried to browserify a very basic script that uses node-schedule and the bundle was correctly created. I didn't test on the browser though
    {
      "name": "tmp",
      "version": "1.0.0",
      "description": "",
      "main": "index.js",
      "dependencies": {
        "browserify": "^13.0.0",
        "node-schedule": "^1.1.0"
      },
      "devDependencies": {},
      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1"
      },
      "author": "",
      "license": "ISC"
    }
    index.js
    var schedule = require('node-schedule');
    
    schedule.scheduleJob('* * * * 0', function() {
      console.log('Job');
    });
    run npm install
    then
    node_modules/.bin/browserify index.js > bundle.js
    then include the bundle.js in the browser and see how it goes
    plexigras
    @plexigras
    sorry i crashed my browser i will try this
    plexigras
    @plexigras
    @santigimeno doesnt work :(
    Santiago Gimeno
    @santigimeno
    what problems are you observing?
    plexigras
    @plexigras
    nothing is happening
    plexigras
    @plexigras
    it looks like node-schedule gets loaded but still doesnt work for some reason schedule.scheduleJob returns {"callback":false,"name":"<Anonymous Job 1>","_events":{}}
    plexigras
    @plexigras
    @santigimeno if i do console.log(JSON.stringify(require('node-schedule'))); i get {"scheduledJobs":{}} so something is happening
    Santiago Gimeno
    @santigimeno
    yes
    I don't know, I can test it right now, will try to do it later
    plexigras
    @plexigras
    ok nice. thanks.
    Santiago Gimeno
    @santigimeno
    @plexigras change the cron expression to * * * * * * and see if the Job is printed in the browser console
    plexigras
    @plexigras
    it is working. thanks
    plexigras
    @plexigras
    @santigimeno now i get an error setImmediate is not defined
    Ivan Marban
    @ivanmarban
    hi guys ! I've got an strange situation with a cron task that I have...
    maybe could clarify me if I have something wrong...
    I have a schedule task: var scraperRule = new schedule.RecurrenceRule(); scraperRule.minute = new schedule.Range(0, 50, 1);
    I want to execute on 50 sec of every minute... but I realized that is not executing the task from minute 50 to 0 of every hour...
    Is there any wrong with that ? or maybe I misunderstand recurrencerule...
    Ivan Marban
    @ivanmarban
    :astonished: I figured it out myself.. I'm using a minute rule... This is what I was looking for: var scraperRule = new schedule.RecurrenceRule(); scraperRule.second = 50;
    Max Xu
    @xumx
    what time zone does the cron job run on? local machine time?
    Santiago Gimeno
    @santigimeno
    @xumx ATM yes, we're trying to add TZ support. I hope, soon
    Tyler Long
    @tylerlong
    any documentation available? for example, how to cancel a scheduled job?
    Abhinav Mall
    @abhinavmall
    How do I unit test the scheduled jobs?
    I wrote a simple node app to schedule fours jobs for my rpi project. I want to write unit test for the same. https://github.com/abhinavmall/aqualightsrpi/blob/master/index.js
    Tarek
    @severos
    Hi there guys, have a small questions here, if I have a recurring job:
    How do I know how much time left until it fires?
    Chris Rutherford
    @cjrutherford
    Question, do I have to set the schedule as the value of an object like var x = schedule.scheduleJob(......); or can I just call schedule.scheduleJob(); and it will run? If assigning to a variable, should I also call it with x(); later?
    Ulrich DOHOU
    @ulrichdohou
    Hello. Is there a way to know when the cron finishes ?
    NORI
    @KamikariCat
    hello there
    can i create the dynamic schedules(dates) what i get from db or json
    Rana Hamza Khursheed
    @RanaHamzaKhurs1_twitter

    Hello everyone!

    Question

    I want to schedule a job to run exactly once at 6pm on a specific date say (04-Nov-2019) and then every day after that at 6pm.

    Rana Hamza Khursheed
    @RanaHamzaKhurs1_twitter
    @cjrutherford you can schedule a job by just schedule.scheduleJob(); but if you assign it to variable then later you can use that variable to cancel the event.
    Kazumasan
    @Kazumasan
    hey can someone help me with binding ? i seems odd to attach it to the code block of the function and i cant seem to get it to work that way
    Kazumasan
    @Kazumasan
    espacially whe used in an enviorment like modules.exports
    Agboola Jude
    @marvinjude

    Hi Devs!

    Please, I need help! Is there any way to assign an ID to a cronjob so it can be deleted/ modified at any time?

    Charles Read
    @charlesread
    Hi, all, can I use the tz configuration parameter with scheduleJob?
    Charles Read
    @charlesread
    From what I can tell the tz configuration parameter is only used with a RecurrenceRule, where it seems I cannot use a crontab string, but I'd like to use a crontab string and specify a timezone
    Neruson
    @neruson27
    Hello anybody can help me?