CronJob Error log path

monaliza

Verified User
Joined
Dec 2, 2014
Messages
9
hi

Where is the CronJob Error log path in Direct Admin?
I searched many guides on the web and this forum but to no avail
thanks
 
I searched many guides on the web
You should have used Google, then just enter:
cronjob error log
as search term and the first result already shows where to look.

Anyway cron is from the OS, not from DA, so it depends a bit on which OS you are using.
For RHEL and deratives (Centos, Alma, Rocky) the /var/log/cron file shows all cron actions and errors.
 
you need to manual set redirect all STDOUT/STDERR to some files. ehhh please use google and learning.

if you not set any redirect, it will come to your contact email.
 
you need to manual set redirect all STDOUT/STDERR to some files
That was not the question, But can you explain what you mean? Because normally in default situations no manual action is required.
Als mostly cron's are set with >/dev/null 2>&1 so nothing will be send to contact e-mail either unless e-mail address is setup when creating the crontab.
 
@Richard G

It's not default, there have button to apply ">/dev/null 2>&1" into command textarea. you can change this redirect output into some files instead of "/dev/null"
 
It's not default, there have button to apply
As for the default I ment the redirect to stdout/stderror to some files, that is setup by default.
All cronput is by default send to a logfile. So I'm wondering as what you mean that you had to redirect that manually to files.

With cron you have to push the button to get no mail of cron, that's correct. But most cron's are setup with the /dev/null often.
 
@Richard G
output in "/var/log/cron", it contain only commard execute. but this thread he want error log of cronjob. so by default it not provide any output to log files. you need to manual redirect to some files.
 
Ah oke I thought errors were also send to the default conjob log file too.
So you mean like this example:
* * * * * myjob.sh **>> /path/to/logfile 2>&1**
 
Back
Top