Send notification on app udate available

i have a few installations of nextcloud on my hosting servers.
manual installation with php + mysql (mariadb).

now to check if an update is available i connect with ssh and launch
php /home/myuser/public_html/nextcloud/updater/updater.phar

but, can i cron a job that sends me a notification with an update is available ?
so i don’t check every months…

thank you in advance

You should subscribe to this RSS feed which informs about app and server updates. Additionally you can create a script which calls the following occ command on a regular base. You can analyse its output and send an email to your account etc., etc.:

./occ app:update --no-ansi --showonly

Sorry my mistake, the correct command you’re looking for is this:

./occ update:check --no-ansi --showonly

thank you

i write quickly this script, tomorrow i can check

php /home/myuser/public_html/nextcloud/occ upgrade > /tmp/upgrade.txt
cat "/tmp/upgrade.txt" | grep 'Nextcloud is already latest version' > /dev/null
if [[ $? -ne 0 ]];
curl (mailgun script to send email)
rm -rf /tmp/upgrade.txt

for you it’s ok?

thank you in advance

i check but no work…

now i can update from 18.0.6 to 18.0.7. but if i run

php /home/myuser/public_html/nextcloud/updater/updater.phar

i have a message to update

instead if i run
php /home/myuser/public_html/nextcloud/occ upgrade
i have this message
Nextcloud is already latest version

can i set a script to check updates?

thank you

I’ve updated my comment, please try the new command.

thank you for reply

result of command
The “–showonly” option does not exist.

con i use without --showonly ?

thank you in advance

now my apps are all updated.
when there is an update i will check

thank you

Mind the two dashes in front of the option! Personally I wouldn’t use the command without that switch, because you don’t want to update existing packages, right?

> ./occ app:update --help
  update an app or all apps

  app:update [options] [--] [<app-id>]

  app-id                update the specified app

      --all             update all updatable apps
      --showonly        show update(s) without updating
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --no-warnings     Skip global warnings, show command output only
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

ok thank you
correct command is
/occ app:update --no-ansi --showonly

before i use
/occ update:check --no-ansi --showonly

thank you.