Git Product home page Git Product logo

Comments (7)

liebig avatar liebig commented on July 24, 2024

Hi vuducbinh,

Thanks for using Cron. I think the problem is that Cron is not in a stable-enough version according to your min imum-stability setting. Please change Cron in composer.json at the require key to "liebig/cron": "dev-master" and try to update again. This will always update to the head version. Additionally I will mark Cron as stable in the next release. If you want to update Cron manually, you can find the src and test folders at laravel\vendor\liebig\cron. But I recommend to use Composer.

Best Regards
Marc

from cron.

vuducbinh avatar vuducbinh commented on July 24, 2024

Thanks. I want to cron run the route url every minutes.
How can I do that?

I create a cron in app/start/global.php

Event::listen('cron.collectJobs', function() {
Cron::add('collect', '* * * * *', function() {
// How to run in url
//@url URL::action('CronController@collect');
});
});

from cron.

liebig avatar liebig commented on July 24, 2024

You can use the example code from the README:

Event::listen('cron.collectJobs', function() {
    Cron::add('example1', '* * * * *', function() {
                    // Do some crazy things unsuccessfully every minute
                });
});

Please note, that you can't run a controller method from Cron. Controller are made for processing user web requests. Add your logic to the example1 function and call Cron via command or route every minute. Please have a look at the README file for more informaton.

from cron.

vuducbinh avatar vuducbinh commented on July 24, 2024

I use window OS. I have installed Cygwin (https://www.cygwin.com/).
Can that software help me cron to run url my webpage every minutes?
If it can, please help me to use it.
Thanks!

from cron.

liebig avatar liebig commented on July 24, 2024

Yes, you can run crontab with Cygwin on the local PC. Please use Google to find how: http://stackoverflow.com/questions/707184/how-do-you-run-a-crontab-in-cygwin-on-windows
For your webpage deployed on a server you can use online cron services. Please use Google to find one like https://www.setcronjob.com/ or https://www.easycron.com/. Please note that I only support the Cron library, not Cygwin or an online cron service provider.

from cron.

vuducbinh avatar vuducbinh commented on July 24, 2024

Yes, thanks for helping me.
Goodluck to you!

from cron.

liebig avatar liebig commented on July 24, 2024

You are welcome.

from cron.

Related Issues (20)

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.