Portál AbcLinuxu, 10. května 2025 05:05
Řešení dotazu:
1 * * * * /home/zmije/skripta nezapomenout odřádkovat za příkazem.
ls -la /home/zmije/skript -rwxr-xr-x 1 zmije zmije 204 2009-12-17 02:15 /home/zmije/skript
Dec 17 10:01:02 Zmije-NB /USR/SBIN/CRON[6103]: (root) CMD (/home/zmije/skript)
1 * * * * /home/zmije/skript >/var/log/zmijescrptout 2>/var/log/zmijescrpterr
#!/bin/bash cd /home/zmije exec 3>test.txt date >&3
man crontab
v Ubuntu je poněkud záludný - je převzatý z Debianu, a píše se v něm:
If the /etc/cron.allow file exists, then you must be listed therein in order to be allowed to use this command. If the /etc/cron.allow file does not exist but the /etc/cron.deny file does exist, then you must not be listed in the /etc/cron.deny file in order to use this command. If neither of these files exists, then depending on site-dependent configuration parameters, only the super user will be allowed to use this command, or all users will be able to use this command. For standard Debian systems, all users may use this command.
Fór je ovšem v tom, že Ubuntu není "standard Debian system", takže bez uživatele v cron.allow
si neškrtnete. Takže tipuju, že pomůže echo "zmije" >> /etc/cron.allow
.
zmijeale pokud mám v crontab
01 * * * * root /home/zmije/skripttak by se to přece mělo spouštět pod rootem a ten by to měl mít povolené
*/1 * * * * root /home/zmije/skript
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.