Score:0

The timed task schedule on Debian 8 does not work

mx flag

On Debian 8, I have files generated when I run this command:

docker exec mysql-gerrit sh -c 'exec mysqldump --databases reviewdb \
    -ugerrit -p"@#$456"' > /root/db_backup/`date +%Y%m%d`.sql

Today I ran this command to generate a 20220309.sql file.

But when I put this line of command in crontab, it doesn't execute.

[root@ankon:~/db_backup]# crontab -l
10 03 * * 6 docker exec mysql-gerrit sh -c 'exec mysqldump --databases reviewdb -ugerrit -p"@#$456"' > /root/db_backup/`date +%Y%m%d`.sql

I would like to ask what causes this? What should I do to solve this problem? Thanks a lot!

cn flag
Specifcally look under the heading "cron runs your command in a restricted environment" because that's almost certainly your issue.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.