From: bartels <bartels@mailme.ath.cx>
To: cygwin@cygwin.com
Subject: Re: Confused about several issues with setting up cron
Date: Tue, 24 Sep 2013 17:42:00 -0000 [thread overview]
Message-ID: <5241CBA1.7000405@mailme.ath.cx> (raw)
In-Reply-To: <B8D164BED956C5439875951895CB4B2211477D08@WABOTH9MSGUSR8C.ITServices.sbc.com>
On 09/24/2013 05:04 PM, KARR, DAVID wrote:
>> -----Original Message-----
>> From: KARR, DAVID
>> Sent: Sunday, September 22, 2013 2:32 PM
>> Subject: RE: Confused about several issues with setting up cron
>>
>>> -----Original Message-----
>>> Sent: Sunday, September 22, 2013 12:46 PM
>>> Subject: Re: Confused about several issues with setting up cron
>>>
>>> On 09/22/2013 05:56 PM, bartels wrote:
>>>> On 09/22/2013 03:00 AM, KARR, DAVID wrote:
>>>>> CYGWIN_NT-6.1 1.7.25(0.270/5/3) 2013-08-31 20:39 i686 Cygwin
>>>>>
>>>>> I want to set up a cron job, so I have to get cron configured. I'm
>> trying
>>> to follow the instructions I can find, but I'm seeing several issues.
>>>>> I'm surprised that there's nothing in the user guide or the FAQ about
>>> setting up cron. I had to settle for the various questions about this
>>>>> on StackOverflow and others.
>>> >>> I want to set up a cron job, so I have to get cron configured. I'm
>>> trying
>>> >> to follow the instructions I can find, but I'm seeing several issues.
>>> >>> I'm surprised that there's nothing in the user guide or the FAQ about
>>> >> setting up cron. I had to settle for the various questions about this
>> on
>>> >> StackOverflow and others.
>>> >>
>>> >> Must say your reporting of events is also lacking crucial elements
>>> >> If you re-install and give me more details, then I will try and answer
>>> your
>>> >> questions.
>>> > Ok. I assume you mean re-installing cron, not Cygwin.
>>> Yes, cron-config is what I meant.
>>> >
>>> > I followed the process described in the FAQ for removing a service. I
>>> then ran cron-config again. When I did this before, I selected to run
>>> cron as myself. I decided to make it run as the local system account this
>>> time (first running "passwd -R" and entering my password). It
>>> appeared to complete without errors or warnings. I did this in a "run as
>>> administrator" window.
>>> >
>>> > In a normal window, I then ran "crontab -e". I figured this would put
>> me
>>> into "vi" with an empty buffer. It just returned to the prompt.
>>> You should see a vi session.
>>> Do you have vi installed?
>>> What is the value of EDITOR?
>> Yes, I have vi installed. EDITOR was blank, but I tried setting it to "vi"
>> and repeating the test, with no change.
>>
>>> This could indicate a deeper problem, confusing not just cron.
>>>
>>> > I then ran "crontab crontab" (the "crontab" file in my current directory
>>> is the file with the one job I want to run), and then did "crontab
>>> -l". Nothing.
>>>
>>> Are you familiar with the crontab format? If not, try this:
>>> $ man 5 crontab
>> Yes, I am familiar with it, but here's the crontab I'm trying to set, in any
>> case:
>>
>> 0 * * * * monitorDataSource
>>
>>> >
>>> > I then went back to the administrator window. I ran "cronevents". This
>>> didn't show anything more than the cron service being started. I
>>> then ran "cronbug". I'm attaching the gzipped copy of this.
>>> >
>>> You will have more luck running cron 'as yourself': it is straightforward.
>>> Running it as a privileged user is more complicated.
>>>
>>> Is there a specific reason why you want to run it as system?
>> No, only because running it as myself didn't work.
>>
>> In any case, I tried stopping and removing the service and rerunning cron-
>> config, running the service as myself. It didn't make any difference. No
>> response from "crontab -e", and "crontab crontab" seemingly ignored. Nothing
>> in "/var/log/cron.log", and nothing in "cronevents" except for the service
>> stopping and starting.
> Any more ideas about this?
>
I guess it is to do with privileges.
cron works on my machines without fail: as system, and as privileged user
If you look at the service
$ cygrunsrv.exe -Q cron --verbose
You can see that you can run cron from your own account like this:
$ /usr/sbin/cron -n
Anyway, the cron process needs read/write access to
/var/cron/tabs/<your account>
No cron file there, means no cron jobs for you.
The fact that you do not get an editor with 'crontab -e' is strange.
I can only guess that EDITOR has a strange value, or crontab dies on privileges.
Have you tried strace?
$ strace -f crontab -e 2>&1 | tee strace.log
You can probably see it dying.
- bartels
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2013-09-24 17:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-22 13:10 KARR, DAVID
2013-09-22 16:16 ` bartels
2013-09-22 19:45 ` bartels
2013-09-23 14:51 ` Andrey Repin
2013-09-23 16:11 ` bartels
2013-09-23 19:00 ` Andrey Repin
2013-09-23 19:26 ` bartels
2013-09-24 5:10 ` bartels
2013-09-22 20:12 ` bartels
[not found] ` <B8D164BED956C5439875951895CB4B221145A863@WABOTH9MSGUSR8C.ITServices.sbc.com>
2013-09-24 17:28 ` KARR, DAVID
2013-09-24 17:42 ` bartels [this message]
[not found] ` <B8D164BED956C5439875951895CB4B221147AEF5@WABOTH9MSGUSR8C.ITServices.sbc.com>
2013-09-24 20:01 ` bartels
2013-09-23 1:41 ` Larry Hall (Cygwin)
2013-09-24 18:37 ` Steve
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=5241CBA1.7000405@mailme.ath.cx \
--to=bartels@mailme.ath.cx \
--cc=cygwin@cygwin.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).