Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved InvoiceNinja cron not enabled

    Invoice Ninja
    5
    19
    2084
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Paraviccini last edited by

      In Invoice Ninja 5 (beta) the cronjobs are not enabled. How can I do this?

      1 Reply Last reply Reply Quote 1
      • nebulon
        nebulon Staff last edited by

        We've moved the package for v5 to use laravel queues instead of crontab. Maybe there is some other reason having to use cron?

        1 Reply Last reply Reply Quote 1
        • P
          Paraviccini last edited by

          Mhm... in the lower left corner there is a warning and when viewing it it says "The crons need to be enabled"

          1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff last edited by

            This should be gone if you update to the latest version.

            ? 1 Reply Last reply Reply Quote 0
            • P
              Paraviccini last edited by

              I thought that when installing it from the App-store it always comes in the newest version. But apart from that after updating it, the error is persisting.

              d19dotca 1 Reply Last reply Reply Quote 0
              • ?
                A Former User @nebulon last edited by

                @nebulon I updated and still encounter the issue. I’ll try a fresh install and report back

                1 Reply Last reply Reply Quote 0
                • d19dotca
                  d19dotca @Paraviccini last edited by d19dotca

                  @paraviccini Depends on when you installed the app from the App Store. In this case, it looks like the Cloudron team pushed a new update 3 hours ago about the time @nebulon mentioned the latest version, so I have a feeling that's what he meant to say that they pushed a fix already for this just a few hours ago now.

                  I was about to install Invoice Ninja 5 today and start the migration process so I'll try to update if I run into the same issue too.

                  --
                  Dustin Dauncey
                  www.d19.ca

                  1 Reply Last reply Reply Quote 0
                  • d19dotca
                    d19dotca last edited by d19dotca

                    I can confirm a fresh deployment also has the cron-related error. This is using v5.1.41-C45, which comes on app package com.invoiceninja.cloudronapp2@0.6.1.

                    1bc8f54c-c8b6-455e-86ba-51833d466305-image.png

                    I'm sure this has already been viewed but including it for quick reference: https://invoiceninja.github.io/docs/self-host-troubleshooting/#cron-not-running-queue-not-running

                    --
                    Dustin Dauncey
                    www.d19.ca

                    nebulon 1 Reply Last reply Reply Quote 0
                    • nebulon
                      nebulon Staff @d19dotca last edited by

                      I can also see the warning on fresh installs, however after adding a client and sending an invoice, eventually it goes away.
                      Thing is the actual tasks it refers to are running and get handled by the laravel queue which is active as described in https://laravel.com/docs/8.x/queues#supervisor-configuration

                      Also hitting the "Refresh Data" shows the tasks being run in the logs, however that notification is not immediately dismissed.

                      d19dotca 1 Reply Last reply Reply Quote 1
                      • d19dotca
                        d19dotca @nebulon last edited by

                        @nebulon Okay thanks for clarifying. So it sounds like an upstream UI bug then in Invoice Ninja and once we start using it it should take care of itself. Sounds good. 👍

                        --
                        Dustin Dauncey
                        www.d19.ca

                        1 Reply Last reply Reply Quote 1
                        • T
                          Telos One last edited by

                          This issue is impacting us on a migration. We can't get the migration to work because the cron is not running on the target server.

                          Should we just create a user or two and hope the cron starts runing?

                          nebulon 1 Reply Last reply Reply Quote 1
                          • nebulon
                            nebulon Staff @Telos One last edited by

                            @telos-one I guess this then is related to the other cron topic.
                            Generally the jobs are run, but at the moment the UI still shows a warning for some time.

                            If you want to manually make sure all pending tasks are run, you can open a webterminal into the app and run the following to process the current tasks:

                            php /app/code/artisan queue:work --sleep=3 --tries=3 --max-time=3600
                            
                            T 1 Reply Last reply Reply Quote 0
                            • T
                              Telos One @nebulon last edited by Telos One

                              @nebulon said in InvoiceNinja cron not enabled:

                              php /app/code/artisan queue:work --sleep=3 --tries=3 --max-time=3600

                              I ran that code via the terminal and it didn't give a response. I had to exit out of the command.

                              I didn't see any change in the dashboard status (red triangle) or have any success with another migration attempt.

                              I am still unclear wether I am supposed to add a line to cron, or if I am just supposed to wait until the error goes away and try migrating again.

                              EDIT*. - For clarity, this is the error we are getting when we try to migrate from our v4 install: "Cross account migration is not allowed. Please read more about it here:"

                              nebulon 1 Reply Last reply Reply Quote 0
                              • nebulon
                                nebulon Staff @Telos One last edited by

                                @telos-one to clarify, the Cloudron package does not even run the cron daemon, so there is no cron to put a line in. Looking at the documentation now again, I am also not sure what the relation between the queues and the worker is.

                                Looking at https://github.com/invoiceninja/dockerfiles/blob/master/examples/v5/supervisor/supervisord.conf it seems we might need another artisan daemon to handle the scheduler.

                                I will prepare an update for the package to test this.

                                1 Reply Last reply Reply Quote 2
                                • nebulon
                                  nebulon Staff last edited by

                                  @Telos-One I've released a new package which now also runs the scheduler via supervisor. Can you check if this solves the issue for you?

                                  1 Reply Last reply Reply Quote 1
                                  • ?
                                    A Former User last edited by

                                    I updated and with the default 512MB of memory I got 5 OOM emails overnight for it. Bumped to 1GB of ram to see if it helps. Might need a bump in default RAM.

                                    nebulon 1 Reply Last reply Reply Quote 0
                                    • nebulon
                                      nebulon Staff @Guest last edited by

                                      @atrilahiji thanks for the feedback, I will increase the default then for the next release.

                                      Is the cron issue solved for you now? Then we can mark this as solved or not.

                                      ? 1 Reply Last reply Reply Quote 1
                                      • ?
                                        A Former User @nebulon last edited by

                                        @nebulon Looks like it? The warning in the bottom-left is gone. I'm not quite sure how to test it to confirm

                                        1 Reply Last reply Reply Quote 1
                                        • T
                                          Telos One last edited by

                                          Confirmation of resolution. Issue is fixed.

                                          1 Reply Last reply Reply Quote 1
                                          • First post
                                            Last post
                                          Powered by NodeBB