0

I have a problem to install cron task on debian server. It was working on my mint station, but when I implement it to crontab and try to install it, it is not working. Can you help me please? User mikrotik is added to group crontab and files are executable.I also tried to run it via at, no change, here is the output.

mikrotik@c24vm4u:~$ crontab -e
0 23 * * * /home/mikrotik/AK_Bratislava/backup.sh >/dev/null 2>&1
2 23 * * * /home/mikrotik/AKTR_Brno/backup.sh >/dev/null 2>&1
4 23 * * * /home/mikrotik/AK_TSCHO_Brno/backup.sh >/dev/null 2>&1
6 23 * * * /home/mikrotik/AK_TSCHO_Praha/backup.sh >/dev/null 2>&1
8 23 * * * /home/mikrotik/BABYDIREKT_MASTER/backup.sh >/dev/null 2>&1
10 23 * * * /home/mikrotik/BABYDIREKT_MODRICE/backup.sh >/dev/null 2>&1
12 23 * * * /home/mikrotik/BABYDIREKT_OSTRAVA/backup.sh >/dev/null 2>&1
14 23 * * * /home/mikrotik/BABYDIREKT_SKLAD1/backup.sh >/dev/null 2>&1
16 23 * * * /home/mikrotik/BABYDIREKT_SKLAD2/backup.sh >/dev/null 2>&1
18 23 * * * /home/mikrotik/DUDE/backup.sh >/dev/null 2>&1
20 23 * * * /home/mikrotik/GRINEX/backup.sh >/dev/null 2>&1
#22 23 * * * /home/mikrotik/CHINATOURS/backup.sh >/dev/null 2>&1
24 23 * * * /home/mikrotik/LZ_LEGAL/backup.sh >/dev/null 2>&1
26 23 * * * /home/mikrotik/S4U_CEJL/backup.sh >/dev/null 2>&1
28 23 * * * /home/mikrotik/S4U_CEJL_VPN/backup.sh >/dev/null 2>&1
30 23 * * * /home/mikrotik/S4U_Lidicka/backup.sh >/dev/null 2>&1
32 23 * * * /home/mikrotik/S4U_TEST/backup.sh >/dev/null 2>&1
34 23 * * * /home/mikrotik/S4U_Veveri/backup.sh >/dev/null 2>&1
36 23 * * * /home/mikrotik/S4U_WIFI_IT_TEAM/backup.sh >/dev/null 2>&1
38 23 * * * /home/mikrotik/S4U_WIFI_OBCHOD/backup.sh >/dev/null 2>&1
40 23 * * * /home/mikrotik/S4U_WIFI_ZASEDACKA/backup.sh >/dev/null 2>&1

mikrotik@c24vm4u:~$ crontab /home/mikrotik/S4U_WIFI_ZASEDACKA/backup.sh
"/home/mikrotik/S4U_WIFI_ZASEDACKA/backup.sh":10: bad minute
errors in crontab file, can't install.

mikrotik@c24vm4u:~/S4U_WIFI_ZASEDACKA$ ll
total 20
drwxr-xr-x  2 mikrotik mikrotik 4096 Dec 20 12:27 .
drwxr-xr-x 24 mikrotik mikrotik 4096 Dec 20 10:27 ..
-rwxrwxr-x  1 mikrotik mikrotik 2764 Dec 19 15:08 backup.sh

Adrian

1
  • Maybe there are a space before the last line in your file, try to remove it with the backspace key then press enter.
    – GAD3R
    Dec 21, 2017 at 9:32

1 Answer 1

1

The problem is probably due to the editor you used, some editors add newlines in some places. crontab reads the first column and will report an error if it is not an integer or #.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .