K
K
kr_ilya2019-07-20 14:08:07
Task Schedulers
kr_ilya, 2019-07-20 14:08:07

How to configure cron correctly?

Unable to set up cron on the server.
In crontab -e I wrote
*/30 * * * * /root/chedak_bot/execute.sh
But every 30 minutes instead of executing the script, I see this entry in the var/mail/root file

/bin/sh: 1: /root/cherdak_bot/execute.sh: not found

although the path to execute.sh is correct.
Why can this be?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
kr_ilya, 2019-07-22
@kr_ilya

It should have been written like this:

*/30 * * * * /bin/bash  /root/cherdak_bot/execute.sh

V
Vitsliputsli, 2019-07-20
@Vitsliputsli

Because the path is not correct, even in your task they are different.

V
Vitaly Karasik, 2019-07-20
@vitaly_il1

Or typo, as mentioned above, or it's another user's cron, and he does not see the files in / root

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question