I get the following errors when cron executes scripts
'unknown': I need something more specific.
It is new, since the last update of cronie.
It happens on several script. (But not all)
The version is : cronie (OpenRC) 0.63
SOLVED: 'unknown': I need something more specific.
-
Chris
- Site Admin
- Posts: 136
- Joined: Mon Jul 21, 2008 9:45 am
- Location: Leuven, Belgium
-
Chris
- Site Admin
- Posts: 136
- Joined: Mon Jul 21, 2008 9:45 am
- Location: Leuven, Belgium
Re: 'unknown': I need something more specific.
I found a work around,
put all the output of the script to /dev/null in cron,
so it doesn't send mails.
But this is not exactly what I want.
I want to know the rootcause.
put all the output of the script to /dev/null in cron,
so it doesn't send mails.
Code: Select all
test.sh > /dev/null 2>&1I want to know the rootcause.
-
Chris
- Site Admin
- Posts: 136
- Joined: Mon Jul 21, 2008 9:45 am
- Location: Leuven, Belgium
Re: 'unknown': I need something more specific.
After a lot of searching a found the problem.
the command less is used in my script.
Under normal use, under my login in bash it is
/usr/bin/less but is the same in /bin/less, /sbin/less and /usr/sbin/less -> vesion: less 692 (PCRE2 regular expressions)
Works perfect without problem.
But not when launched by cron ...
Replacing it with cat in the script solved it.
cat does display entire file content.
and less views file with pagination.
So it does make more sence using cat.
It work before version 692, just with the latest update it broke.
the command less is used in my script.
Under normal use, under my login in bash it is
/usr/bin/less but is the same in /bin/less, /sbin/less and /usr/sbin/less -> vesion: less 692 (PCRE2 regular expressions)
Works perfect without problem.
But not when launched by cron ...
Replacing it with cat in the script solved it.
cat does display entire file content.
and less views file with pagination.
So it does make more sence using cat.
It work before version 692, just with the latest update it broke.