на главную | войти | регистрация | DMCA | контакты | справка | donate |      

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Э Ю Я


моя полка | жанры | рекомендуем | рейтинг книг | рейтинг авторов | впечатления | новое | форум | сборники | читалки | авторам | добавить



6.4.3.3. ...loading the crontab from a file?

When executed without any arguments, the crontab command will read the crontab configuration from the standard input. You can use this feature to load the configuration from a file:

$ crontab < /tmp/newcrontab


To see the current crontab configuration, use the -l option:

$ crontab -l

# Backup ~chris/oreilly/ to bluesky:~chris/backup/ as a tar archive

30 0,12 * * * /usr/local/bin/bluesky-backup-oreilly


# Update the local rawhide repository

0 5 * * * /usr/local/bin/rawhide-rsync


Putting these features together, you can create a simple script to edit a crontab configuration:

#!/bin/bash

# addtmpclean :: add a crontab entry to clean ~/tmp daily


(crontab -l ; echo "30 4 * * * rm -f ~/tmp/*")|crontab


6.4.3.2. ...using an editor other than vi to edit the crontab? | Fedora Linux | 6.4.4. Where Can I Learn More?