OPNsense Forum

English Forums => General Discussion => Topic started by: guest27102 on February 16, 2021, 07:23:51 pm

Title: How to troubleshoot cron jobs?
Post by: guest27102 on February 16, 2021, 07:23:51 pm
I don't get why my cron jobs doesn't run. I've setup a cron job to automatically update the unbound dns blacklist, but it never runs. I have it configured to run every night at 04. And I have setup a few others to run when I know I'm home to check whether they run or not. For instance before writing this post, I setup a new cron job for updating the blacklist and the reboot at
Code: [Select]
15 * * * * meaning it shout have ran at 19.15 (now it is 19.22) and it never ran.

I can't figure anywhere to check why if didn't ran, what happened, any error. I can't see a tasklist of completed or fail tasks.
Title: Re: How to troubleshoot cron jobs?
Post by: lfirewall1243 on February 16, 2021, 09:32:37 pm
Have you added the cronjob over the Web Interface of OPNsense?
Title: Re: How to troubleshoot cron jobs?
Post by: guest27102 on February 16, 2021, 10:13:26 pm
Yes, sorry. That is true, I added the cron job via the web interface.
Title: Re: How to troubleshoot cron jobs?
Post by: lfirewall1243 on February 16, 2021, 10:15:06 pm
Yes, sorry. That is true, I added the cron job via the web interface.
Take a screenshot of it
Title: Re: How to troubleshoot cron jobs?
Post by: Maurice on February 16, 2021, 11:57:42 pm
I've setup a cron job to automatically update the unbound dns blacklist, but it never runs.

Are you sure it doesn't run? This works fine for me, but it doesn't write anything to the system log. You can check the Unbound log for restarts or the modification date of /var/unbound/etc/dnsbl.conf.

Also, make sure to click the Apply button after adding a cron job.
Title: Re: How to troubleshoot cron jobs?
Post by: guest27102 on February 17, 2021, 02:40:14 pm
Quote
Take a screenshot of it

Title: Re: How to troubleshoot cron jobs?
Post by: lfirewall1243 on February 17, 2021, 04:05:07 pm
Quote
Take a screenshot of it
And where do you see that its not working ?