R
R
Ruslan2015-04-16 08:30:43
linux
Ruslan, 2015-04-16 08:30:43

An interesting problem with cron?

Good day!
I ran into a problem in cron - when specifying a clear task execution time, cron simply reloads the config:

19 13 * * * /usr/sbin/squid3 -k reconfigure 
cron.log : Apr 16 13:19:01 r38p-01-proxyd /usr/sbin/cron[2299]: (root) RELOAD (crontabs/root)

But at the same time, if you specify such an interval:
*/1 * * * * /usr/sbin/squid3 -k reconfigure
cron.log: Apr 16 13:20:01 r38p-01-proxyd /USR/SBIN/CRON[19715]: (root) CMD (/usr/sbin/squid3 -k reconfigure)

then everything works great. What could be the problem?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
microphone, 2015-04-16
@microphone

#minute hour mday month wday who command
*/5 * * * * root /usr/libexec/atrun
Where is the user?

M
Mikhail Tikhonin, 2015-04-16
@phpclimber

Maybe try putting the command in quotes?

D
Danila, 2015-04-16
@Ke1eth

Alternatively, try this.
/usr/sbin/squid3 -k reconfigure >> /dev/null 2>&1

D
Denis Verbin, 2015-04-16
@rez0n

Not

S
SupportIT, 2015-04-23
@SupportIT

If this is the last line, then you need a CR at the end.
There are problems without it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question