Location of Crontab Log

Guys,

I cant seem to find the location of the crontab(/etc/crontab) log ?
There is no /var/log/messages …

This is a 15.1 box.

Thanks,
PLMarco

Note - the script runs fine from the command line when executed manually. I just need to see what is the issue when its run from
/etc/crontab/

I am not sure that error output (going to stdout) will go to any logging. It will be mailed to the owner of the crontab.

In any case, a few hints for “it runs when done from the terminal, but not from cron”.
Use absolute pathes, when running from the terminal you are in a working directory, your cron job will not know that working directory. Thus either do a

cd the-working-directory

at the begin of your cron command and then work relative to that, ot use absolute pahhes only.

Other envirinment variables may also not be set to what you expect (your expectation might be that you think that all that is in your terminal session is autmaticaly available when your background cron job starts, this is not the case). There is a lot about environment variables in

man 5 crontab

openSUSE lets systemd/journald do the logging. For example, try

journalctl --no-hostname --output=short-precise | grep -i cron

(Depending on your permissions, you may have to prepend a »sudo«: »sudo journalctl«…)

If you like, let us know the last few dozen lines of output or so.

Thanks guys … Looks like there is no more /var/log/messages etc.

These logs ( due to systemd ) are being handled by the journald daemon.

To look at cron and see if the file is being executed, I used

" journalctl -u cron.service -f "

Thanx.

I hope the log helps you in finding what goes wrong.

BTW, when you come back in the future:

There is an important, but not easy to find feature on the forums.

Please in the future use CODE tags around copied/pasted computer text in a post. It is the # button in the tool bar of the post editor. When applicable copy/paste complete, that is including the prompt, the command, the output and the next prompt.

An example is here: Using CODE tags Around your paste.

Yes, that’s absolutely correct.
All distros that run systemd instead of the legacy SysVinit now log everything in a single log database accessible with the “journalctl” command. There are numerous advantages to doing this.

But, be aware also that a number of apps and services are also no longer managed by cron although cron will likely remain as an option for years to come. Instead, there is a “timer” service that can be used for same/similar purposes.

Either way though, logging will be to the journal.

TSU