Crontab -e in pfSense for ACME certificate renewal

Hi,

I was adding a line to crontab -e and when trying to save the edit I get this return on exit. every time: ~
/tmp/crontab.2bvBtGqux4: 17 lines, 1213 characters.
crontab: installing new crontab
"/tmp/crontab.2bvBtGqux4":16: bad hour
crontab: errors in crontab file, can't install
Do you want to retry the same edit?
My domain is: n/a

The line that looks as if it's the error is: 16 3 * * * root /usr/local/pkg/acme/acme_command.sh "renewall" | /usr/bin/logger -t ACME 2>&1

Where the "3" is after the "16" I think it should be "*" if anyone can check in there crontab file and let me know that would be swell.

I ran this command: crontab -e in ssh

It produced this output: ~
/tmp/crontab.2bvBtGqux4: 17 lines, 1213 characters.
crontab: installing new crontab
"/tmp/crontab.2bvBtGqux4":16: bad hour
crontab: errors in crontab file, can't install



Do you want to retry the same edit?

My web server is (include version): n/a

The operating system my web server runs on is (include version): pfSense 2.7.2 CE

My hosting provider, if applicable, is: n/a

I can login to a root shell on my machine (yes or no, or I don't know): yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): pfSense

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): PfSense

This is not a pfSense community forum.
That said, crontab is crontab on all systems that run it.
The "3" means 3 a.m. [in your time zone].
"*" would run that job hourly.
The error is about a "16" [not a "3"].
It also states:

You only showed 5 lines.
There may be another line with a "16" in the hour column.

2 Likes

2 Likes

Confusingly, I suspect it means "line 16" rather than "invalid numeric value 16" (though I can see how it would be very easy to confuse the two). I suspect line 16 of the edited crontab file has a second field with a non-numeric (and non-asterisk) value.

I just tried intentionally making an invalid crontab file and indeed got exactly this message, where the number at the beginning is a line number. (It looks like the line number is counted starting from 0, not starting from 1, so it might be line 17 from the point of view of a traditional text editor.)

2 Likes

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