Cron issues. Task doesn't run when minutes used

Keywords: LAMP/MAMP/WAMP - Virtual Machines - Technical issue - Other

bndiagnostic ID: f513dc0b-bc7b-af71-cb32-3350d869f4dd

bndiagnostic output:

? Connectivity: Found possible issues
? Resources: Found possible issues
? Apache: Found possible issues
https://docs.bitnami.com/general/faq/administration/use-firewall/
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/

bndiagnostic failure reason: The suggested guides are not related with my issue

Description:
HI!
I got an issue with cron. Edit tasks with sudo crontub -e.
Have a look at simple test:

*/2 8,11,14,17,23 * * * echo “This is a new line” >> /opt/bitnami/apache/htdocs/q2_cron.log 2>&1

Works: Mar 15 11:34:01 debian CRON[1329]: (root) CMD (echo “This is a new line” >> /opt/bitnami/apache/htdocs/q2_cron.log 2>&1)

10 8,11,14,17,23 * * * echo “This is a new line” >> /opt/bitnami/apache/htdocs/q2_cron.log 2>&1
Doesn’t work. Nothing mentioned in syslog.

I want to run my php script at 10 minute of 8,11,14,17,23 hour. If I input exact number of minutes - the task doesn’t run. If I use something like */2 - it works.

Already looked through topics about cron and didn’t find relevant one.

Hi @Alx64,

Thank you for reporting this issue but it’s related to the cron package in Debian and you should report it in the Debian forums

https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=cron

Thanks

Finally, found how to make it work.

I had to manually edit /etc/crontab - this worked.

Adding tasks through sudo crontab -e or adding a file in /etc/cron.d/ - didn’t.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.