JMSJobQueueBundle | Schedule Symfony Console Commands as Background | Cron Utils library

 by   schmittjoh PHP Version: 2.1.0 License: No License

kandi X-RAY | JMSJobQueueBundle Summary

kandi X-RAY | JMSJobQueueBundle Summary

JMSJobQueueBundle is a PHP library typically used in Utilities, Cron Utils, Symfony applications. JMSJobQueueBundle has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

Run and Schedule Symfony Console Commands as Background Jobs
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              JMSJobQueueBundle has a low active ecosystem.
              It has 332 star(s) with 224 fork(s). There are 26 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 50 open issues and 82 have been closed. On average issues are closed in 290 days. There are 41 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of JMSJobQueueBundle is 2.1.0

            kandi-Quality Quality

              JMSJobQueueBundle has 0 bugs and 0 code smells.

            kandi-Security Security

              JMSJobQueueBundle has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              JMSJobQueueBundle code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              JMSJobQueueBundle does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              JMSJobQueueBundle releases are available to install and integrate.

            Top functions reviewed by kandi - BETA

            kandi has reviewed JMSJobQueueBundle and discovered the below as its top functions. This is intended to give you an instant insight into JMSJobQueueBundle implemented functionality, and help decide if they suit your requirements.
            • Close a job
            • Check the running jobs
            • List job s statistics
            • Set the state .
            • Initialize the related entities .
            • Acquires a cron job lock .
            • Find expired jobs .
            • Post persist related entities .
            • Get the configuration tree builder .
            • On tick
            Get all kandi verified functions for this library.

            JMSJobQueueBundle Key Features

            No Key Features are available at this moment for JMSJobQueueBundle.

            JMSJobQueueBundle Examples and Code Snippets

            No Code Snippets are available at this moment for JMSJobQueueBundle.

            Community Discussions

            Trending Discussions on JMSJobQueueBundle

            QUESTION

            Single instance cronjob in Amazon ElasticBeanstalk
            Asked 2017-Feb-24 at 07:54

            I have recently moved my Symfony Project to Elastic Beanstalk, from a manually scaling EC2 environment, and i have stumbled on to an issue.

            I have a Cron job that grabs a bunch of subscriptions that are past due, and attempts to create orders and charge them, it is very important that this job only runs on a single server cause it grabs them in a batch, if there is a duplicate Cron running, it will lead to multiple charges on the same subscriptions.

            In the manually scaling environment, I just had a primary server, that had a crontab and ran the subs, but that does not seem doable here.

            Any suggestions on how to set this up in a auto-scaling enviroment with no primary server?

            I have looked into JMSJobQueueBundle, but it also seems to rely on supervisor only running a single instance of the crontab, this would be duplicate in an auto scaling environment.

            Is my best bet to have an external server ping my API every X minutes and launch the job on the single instance it pings? This seems to introduce another point of failure.

            ...

            ANSWER

            Answered 2017-Feb-24 at 07:54

            Just as a warning, the problem you are trying to solve is not a trivial one.

            A few options:

            1. If you connect to a MySQL database, acquire a lock (https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_get-lock) at the beginning of the transaction and release the lock at the end. this will prevent multiple cronjobs to run the code at the same time. works only if everything is handled inside SQL.

            2. As you mentioned, you can use AWS Lambda + CloudWatch Events to trigger a Lambda function every x minutes and the Lambda can than trigger your script via http(s). But lambda does not guarantee that is does so exactly once, so this is not safe.

            3. Use a service where you can acquire a distributed lock (e.g. etcd, consul, redis, ...) and implement in a similar way than 1 just not in your MySQL database. Still you can nor really enfore exactly once with this.

            4. put the cronjob on a separate ec2 instance where you know that it exsists only once (in case of this ec2 instance goes down nothing will run, but as far as I understand your requirements this is not a problem because the script can run 15 minutes later and still catches up with all the work.

            The more "modern" approach in distributed systems would be to make your action idempotent.

            Source https://stackoverflow.com/questions/42414413

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install JMSJobQueueBundle

            You can download it from GitHub.
            PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Cron Utils Libraries

            cron

            by robfig

            node-schedule

            by node-schedule

            agenda

            by agenda

            node-cron

            by kelektiv

            cron-expression

            by mtdowling

            Try Top Libraries by schmittjoh

            php-option

            by schmittjohPHP

            serializer

            by schmittjohPHP

            JMSSerializerBundle

            by schmittjohPHP

            metadata

            by schmittjohPHP

            php-collection

            by schmittjohPHP