Activity:send-mails comand not working

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 13.0.0
Operating system and version (eg, Ubuntu 17.04): debian 8.4
Apache or nginx version (eg, Apache 2.4.25): 2.4.10
PHP version (eg, 7.1): 7.1

The issue you are facing:
According to the doc, there is a activity:send-mails command. But it is not working : “There are no commands defined in the “activity” namespace.”

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Run the comand php occ activity:send-mails

The output of your Nextcloud log in Admin > Logging: No output

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
    'instanceid' => '',
    'passwordsalt' => '',
    'secret' => '',
    'trusted_domains' =>
        array (
            0 => '',
    'datadirectory' => '',
    'overwrite.cli.url' => '',
    'dbtype' => 'mysql',
    'version' => '',
    'dbname' => '_cloud',
    'dbhost' => '',
    'dbport' => '',
    'dbtableprefix' => 'oc_',
    'dbuser' => '',
    'dbpassword' => '',
    'logtimezone' => 'UTC',
    'installed' => true,
    'allow_user_to_change_display_name' => true,
    'session_keepalive' => false,
    'token_auth_enforced' => true,
    'mail_domain' => '',
    'mail_smtpmode' => 'sendmail',
    'appstoreenabled' => false,
    'memcache.local' => '\\OC\\Memcache\\APCu',
    'memcache.locking' => '\\OC\\Memcache\\Redis',
    'redis' =>
        array (
            'host' => 'localhost',
            'port' => 6379,
    'mail_from_address' => 'contact',
    'maintenance' => false,
    'loglevel' => 2,
    'mail_smtpauthtype' => 'LOGIN',
    'activity_expire_days' => 365

The output of your Apache/nginx/system log in /var/log/____: -


I’m running NC 13.0.4 and cannot confirm your issue. I successfully run the following cronjobs:
*/30 * * * * php -f /var/www/nextcloud/occ activity:send-mails hourly
0 12 * * * php -f /var/www/nextcloud/occ activity:send-mails daily
0 18 * * FRI php -f /var/www/nextcloud/occ activity:send-mails weekly

Even running
sudo -u http php /var/www/nextcloud/occ activity:send-mails
doesn’t through any error messages.

For me this message indicates, that the activity app is not installed/ enabled currently.
Could you check that please?

Thanks, that was the trick :slight_smile: