Cron Jobs not working

jorge

Verified User
Joined
Feb 28, 2024
Messages
7
I have the following in the cron tasks section:
/bin/bash /usr/local/bin/backups_bds.sh f2nixn4t > /dev/null 2>&1

You already have the minutes, hours, etc. Everything is configured but when I go to the path that I specified I can't find the file that it is supposed to create.
 
Code:
/bin/bash /usr/local/bin/backups_bds.sh f2nixn4t >> "~/cron.log" 2>&1

trying this, log output should generate under user home dir "/home/{USER}/cron.log" .
 
Code:
/bin/bash /usr/local/bin/backups_bds.sh f2nixn4t >> "~/cron.log" 2>&1

trying this, log output should generate under user home dir "/home/{USER}/cron.log" .
No, it still doesn't work. 🤔
I checked my time zone and it is the same as on the server, so indeed the task is not running.
The strange thing is that if I run it from the server terminal, the script runs, so there are no errors inside. (At least I think so)
 
Hello jorge,

You might try then:

Code:
/bin/bash -x /usr/local/bin/backups_bds.sh f2nixn4t >> "~/cron.log" 2>&1
\

If the fie "~/cron.log" does not exist, you will need to check cron system logs under /var/log/ and INBOX of a user, in behalf of which the cron task is supposed to run, for possible clues.
 
Hello jorge,

You might try then:

Code:
/bin/bash -x /usr/local/bin/backups_bds.sh f2nixn4t >> "~/cron.log" 2>&1
\

If the fie "~/cron.log" does not exist, you will need to check cron system logs under /var/log/ and INBOX of a user, in behalf of which the cron task is supposed to run, for possible clues.
I just checked the log and found the following:
 

Attachments

  • imagen_2024-06-11_141752607.png
    imagen_2024-06-11_141752607.png
    13.1 KB · Views: 41
  • imagen_2024-06-11_141826594.png
    imagen_2024-06-11_141826594.png
    56.3 KB · Views: 41
Your MySQL installation might be corrupted. You can try and repair it.

Try on your own risk: https://forum.directadmin.com/threads/unknown-storage-engine-aria.70274/#post-372433 and probably other https://www.google.com/search?q=uknown+storage+engine+aria

If it fails, then you will need to re-install MySQL server and restore databases from a dump.
I have mariadb running instead of mysqld, should I stop the mariadb service?
I remember that I had to run mariadb because mysqld never ran and the aria error appeared but the files are there.
 
mysqld is linked to mariadb in systemd. So it actually does not matter for systemd which you run MySQL or MariaDB.
 
Back
Top