Funny Error with Cron Job

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, 18.0.2): 18.0.4
Operating system and version (eg, Ubuntu 20.04): CentOS 7
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.6
PHP version (eg, 7.1): 7.4

The issue you are facing:

I am using system cron for background job. It was running fine until now. The cron log is giving me this error:

May 17 01:50:01 cloud CROND[2455]: (hassanenterprise) CMD (php -f /home/hassanenterprise/domains/ #Nextcloud Cron)
May 17 01:50:01 cloud CROND[2455]: (CRON) ERROR chdir failed (redis): No such file or directory

I could run the cron.php script from CLI but the problem is when cron is trying to run it.

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

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:


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


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


Do you start the cron-job with the same user?
do you start the cron-job from the same directory?

Hello devnull,

Thank you very much for your reply. I ran the cron-job with the same user but the home directory in the environment somehow got changed to anther one (Redis). I might have done something wrong while installing/configuring the Redis server. I have changed the home directory in the shell env of the user and everything is working fine again now. Thank you very much for your help.

1 Like