Score:1

Ubuntu 20.04 cron jobs doesn't work when a specific time was added

in flag

I had a strange behavior in Ubuntu 20.04 cron job:

* * * * * echo "Hello world!" >> /tmp/hello.log 2>&1    <---working with logs
5 10 * * * echo "Hello world!" >> /tmp/hello.log 2>&1   <---doesn't working, no logs.

My another debian 11 are working fine with both time-set above.

The time/timezone, privilege are all good, any ideas?

cn flag
Bob
Does this answer your question? [Why is my crontab not working, and how can I troubleshoot it?](https://serverfault.com/questions/449651/why-is-my-crontab-not-working-and-how-can-i-troubleshoot-it) - among the many debug options and common issues the missing new line after the last entry in a cron tab file that otherwise looks good is a likely candidate in your example
Score:0
in flag

It turns out I didn't restart cron service after I changed the timezone.

service cron restart

Solved the problem.

Paul avatar
cn flag
In the future, you could include details in your question, such as where you are adding the cron job. For example, I assumed you were using `crontab`.
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.