Simulate Cron Jobs & artisan commands


  • | 607 points

    Hi, first of all thanks for this awsome work.

    • As you know seting CRON jobs are pain on windows. Is there a way to make it easy with laragon?

    • And for example on laravel you can create queue's as you know,
      When you want to use need to run artisan command(s) and in real world example (as far as i know) on linux systems you need to set up supervisor service's for this type of things.

    If is it possible laragon has able to handle with these it would be awsome ?

    Again thanks for awsome work.
    God Bless You. <3


  • administrators
    | 115272 points

    @akcan :

    1. I think Laragon can simulate cron job
    2. Can you provide more specific info for artisan commands?

  • | 607 points

    Hi, thanks for your attention;

    About artisan commands,
    When you created neccesarry files for queue system we need to run php artisan queue:work command from terminal and it runs continusly.

    this provides processing for queues.

    More details can be find here: https://laravel.com/docs/5.8/queues

    There are some variations about this commands like

    php artisan queue:work --tries=3
    php artisan queue:work --once
    php artisan queue:work --timeout=30
    
    etc..
    

    i know i can open up terminal and can run these commands but i use laragon as a production tool so when server restarted these commands stops.

    And these must be run after apache/mysql start and the location of artisan file is project root of laravel.

    For example
    if i create a project in C:\laragon\www\someproject folder these artisan must be work in the someproject folder.

    i hope i can explain (non english person)


  • administrators
    | 115272 points

    @akcan : Nice - your answer is very detailed. Good news is Laragon had the feature 2 years ago :)

    The answer is Procfile (Menu > Laragon > Procfile)
    In your case, just put:

    SomeProject Queue=php artisan queue:work --tries=3 autorun pwd=C:\laragon\www\someproject
    

    Take note in autorun, pwd

    Ref: https://forum.laragon.org/topic/476/laragon-feature-procfile-what-is-it


  • | 607 points

    This was pretty awsome before this post i have no idea about that has been implemented :)

    because of the name of the system name i have never clicked that button called "Procfile - What is it?" (my bad)

    You are awsome <3

    Thanks for everythnig.

    Ps: with this feature could we set the cron jobs ? i check the heroku doc but can't find the details about that.


  • | 83 points

    "As you know seting CRON jobs are pain on windows. Is there a way to make it easy with laragon?"

    Webcron like easycron.com is useful to webmasters. It allows you to launch any script installed on your webserver or shared hosting account at any time. It is a web-based implementation of the Crontab under Unix/Linux and the Task Scheduler under Windows.


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.