ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Padukov Vladimir <pvb@soyuz.com.ua>
To: community@altlinux.ru
Subject: Re: [Comm] Re: [Comm] Re: [Comm]Re:Не выполняетсяcronфайл
Date: Wed, 19 Mar 2003 17:27:37 +0200
Message-ID: <3E788C69.4050603@soyuz.com.ua> (raw)
In-Reply-To: <3E788666.00000F.25707@tide.yandex.ru>

unix9 пишет:

>>>>>Подробнее. В каталоге /etc/cron.daily находится файл sarg, который
>>>>>почему то не выполняется. Понять почему это происходит я не могу т.к.
>>>>>в /var/log/cron/ в файлы errors и warnings сообщений об ошибках нет.
>>>>>Как мне отследить почему файл не выполняется?
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>1) ls -l /etc/cron.daily/sarg - этот файл исполняемый?
>>>>   
>>>>
>>>>        
>>>>
>>>да, файл исполняемый
>>>
>>> 
>>>
>>>      
>>>
>>>>2) cron присылает отчёты о выполнении заданий по почте - по умолчанию
>>>>они направляются root, для которого при установке автоматически
>>>>настраивается переадресация почты первому созданному пользователю.  Это
>>>>не работает, если не установлен MTA (например, postfix).
>>>>   
>>>>
>>>>        
>>>>
>>>постфикс стоит
>>>
>>> 
>>>
>>>      
>>>
>>>>В логах cron вы не увидите сообщений о запуске отдельных скриптов из
>>>>/etc/cron.daily и т.п. - только запуск run-parts /etc/cron.daily.
>>>>
>>>>3) Работает ли этот файл при его запуске вручную?
>>>>   
>>>>
>>>>        
>>>>
>>>если запускать вручную то работает.
>>>
>>>      
>>>
>>Покажите запись из cron.
>>    
>>
>
>
>а как этот сделать?
>
Посмотреть файл etc/crontab

Вообще это работает следующим образом.

Каждую минуту стартует сервис cron, который читает etc/crontab
crontab это сценарий, там вот такая запись
=============8<----------------
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
============8<--------------
Так вот.
01 * * * * root run-parts /etc/cron.hourly
эта запись звучит так 
кождую минуту (01), от rootа запускать run-parts и парсить папку 
/etc/cron.hourly
а run-parts, уже выполняет скрипт который там находит.
Но там же в etc/crontab, можно сделать подобную запись, которая бы 
запускала, другой скрипт в другом месте, под другим пользователем.
звездочки это время, от первой минуты, часы, дни, месяца, года.

Это планировщик, почитайте ман там все довольно просто.
Основные проблемы пути и права.






  reply	other threads:[~2003-03-19 15:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-18 10:27 [Comm] Не выполняется cron файл unix9
2003-03-18 15:22 ` [Comm] " Sergey Vlasov
2003-03-18 18:38   ` [Comm] Re: [Comm] Re:Не выполняетсяcronфайл unix9
2003-03-19 13:06     ` Sergey Vlasov
2003-03-19 15:00       ` [Comm] Re: [Comm]Re:Не выполняетсяcronфайл unix9
2003-03-19 15:16         ` Sergey Vlasov
2003-03-20  6:51           ` Nick N. Vinogradov
2003-03-19 13:46     ` [Comm] Re: [Comm] выполняетсяcronфайл Padukov Vladimir
2003-03-19 13:55       ` Padukov Vladimir
2003-03-19 15:01       ` [Comm] Re: [Comm] Re: [Comm]Re:Не выполняетсяcronфайл unix9
2003-03-19 15:27         ` Padukov Vladimir [this message]
2003-03-19 15:33           ` [Comm] Re: [Comm] Re: [Comm] выполняетсяcronфайл unix9
2003-03-19 16:53             ` Padukov Vladimir
2003-03-20 21:50 ` [Comm] Re: Не выполняется cron файл Alexey Tourbin
2003-03-21  6:05   ` [Comm] Re: [Comm] " unix9

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E788C69.4050603@soyuz.com.ua \
    --to=pvb@soyuz.com.ua \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git