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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Invoice Ninja
  3. InvoiceNinja - Update Currency Exchange Rates

InvoiceNinja - Update Currency Exchange Rates

Scheduled Pinned Locked Moved Invoice Ninja
8 Posts 3 Posters 1.4k Views 2 Watching
  • 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.
  • S Offline
    S Offline
    spacetime
    wrote on last edited by spacetime
    #1

    I would like to be able to manually trigger the currency exchange rate updater from the CLI or by passing a url query parameter such as ?update-rates. I would also like to know how to change the scheduler for the currency exchange rate updater.

    Currency Conversion (exchange rate updater) Docs
    https://invoiceninja.github.io/en/self-host/#currency-conversion

    Updater Job
    https://github.com/invoiceninja/invoiceninja/blob/v5-stable/app/Jobs/Util/UpdateExchangeRates.php

    This job could be run via the laravel-job tool, if it was installed or installable.
    https://github.com/mxl/laravel-job

    Update Schedule
    https://github.com/invoiceninja/invoiceninja/blob/a52e138a392c37df0ff05f40d7b37d0c7446647e/app/Console/Kernel.php#L73

    1 Reply Last reply
    0
    • robiR Offline
      robiR Offline
      robi
      wrote on last edited by
      #2

      check the Cloudron docs for cron to run any command for the app

      Conscious tech

      S 2 Replies Last reply
      0
      • robiR robi

        check the Cloudron docs for cron to run any command for the app

        S Offline
        S Offline
        spacetime
        wrote on last edited by
        #3

        @robi the issue is that the UpdateExchangeRates.php job is not built as a command as far as I can see. I tried to create a Laravel command for it but the secure file system prevents me from doing that. I would like it to exist as php artisan ninja:update-ex or the like.

        girishG 1 Reply Last reply
        0
        • robiR Offline
          robiR Offline
          robi
          wrote on last edited by
          #4

          just make sure to do it in /app/data

          there should be other examples on the forum if you search for php artisan

          Conscious tech

          1 Reply Last reply
          0
          • robiR robi

            check the Cloudron docs for cron to run any command for the app

            S Offline
            S Offline
            spacetime
            wrote on last edited by spacetime
            #5

            I am not sure what you are thinking of. I did a search.
            This is what I get when I try to make a command in app/data:

            root@...:/app/data# php /app/code/artisan make:command
              What should the console command be named?
            ❯ ninja:update-ex
            In Filesystem.php line 190:
             file_put_contents(/app/code/app/Console/Commands/ninja:update-ex.php): Failed to open stream: Read-only file system  
            
            1 Reply Last reply
            0
            • S spacetime

              @robi the issue is that the UpdateExchangeRates.php job is not built as a command as far as I can see. I tried to create a Laravel command for it but the secure file system prevents me from doing that. I would like it to exist as php artisan ninja:update-ex or the like.

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              @spacetime The CLI commands require changes upstream. You should report it in their forum or discussion area. https://github.com/invoiceninja/invoiceninja/ or https://forum.invoiceninja.com/ . We only package the app, we cannot make changes or add features.

              S 1 Reply Last reply
              0
              • girishG girish

                @spacetime The CLI commands require changes upstream. You should report it in their forum or discussion area. https://github.com/invoiceninja/invoiceninja/ or https://forum.invoiceninja.com/ . We only package the app, we cannot make changes or add features.

                S Offline
                S Offline
                spacetime
                wrote on last edited by spacetime
                #7

                @girish understood. What about the scheduled exchange rate updater? It seems it is broken and does not automatically run on Cloudron. It is difficult to test since it only runs once per day. I have added the necessary API key to the .env file.

                1 Reply Last reply
                0
                • girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #8

                  @spacetime You can just run sudo -u www-data php /app/code/artisan schedule:run in the web terminal. Does that not work ?

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Bookmarks
                  • Search