delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/08/10/00:13:17

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.0 required=5.0 tests=AWL,BAYES_00,BOTNET,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
Message-id: <50248A39.1040209@cygwin.com>
Date: Fri, 10 Aug 2012 00:12:41 -0400
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-to: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: running interactive process on xp through cron not working
References: <1344396878 DOT 20779 DOT 140661112064606 DOT 7AB245A7 AT webmail DOT messagingengine DOT com>
In-reply-to: <1344396878.20779.140661112064606.7AB245A7@webmail.messagingengine.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 8/9/2012 9:15 PM, Mark Smith wrote:
> so I am trying to run notepad through cron on my xp machine, but it
> simply won't work.
>
> running cron-config works fine:
> ---
> $ cron-config
> Cron is already installed as a service under account LocalSystem.
> Do you want to remove or reinstall it? (yes/no) yes
> OK. The cron service was removed.
>
> Do you want to install the cron daemon as a service? (yes/no) yes
> Enter the value of CYGWIN for the daemon: [ ] ntsec
>
> You must decide under what account the cron daemon will run.
> If you are the only user on this machine, the daemon can run as
> yourself.
>     This gives access to all network drives but only allows you as user.
> Otherwise cron should run under the local system account.
>    It will be capable of changing to other users without requiring a
>    password, using one of the three methods detailed in
>    [cut out to trick anti-spam-bot]
> Do you want the cron daemon to run as yourself? (yes/no) no
>
>
> Running cron_diagnose ...
> ... no problem found.
>
> Do you want to start the cron daemon as a service now? (yes/no) yes
> OK. The cron daemon is now running.
>
> In case of problem, examine the log file for cron,
> /var/log/cron.log, and the appropriate syslog file
> for information about the problem cron is having.
>
> Examine also any cron.log file in the HOME directory
> (or the file specified in MAILTO) and cron related files in /tmp.
>
> If you cannot fix the problem, then report it to [cut out to trick
> anti-spam-bot].
> Please run the script /usr/bin/cronbug and ATTACH its output
> (the file cronbug.txt) to your e-mail.
>
> WARNING: PATH may be set differently under cron than in interactive
> shells.
>           Names such as "find" and "date" may refer to Windows programs.
> ---
> my crontab:
> ---
> * * * * * touch /tmp/crontab.working
> ---
> After doing this, my cron job seems to execute fine, the timestamp of
> /tmp/crontab.working updates every minute.
>
> However, when I set the cron service to allow to interact with the
> desktop (start-run-services.msc-cron-Log On-Allow service to interact
> with desktop), my crontab stops executing, even though cron continues to
> be running. Even after restarting cron, my crontab does not execute, my
> /tmp/crontab.working timestamp remains untouched.
>
> running cronevents.exe to see the eventlog of cron, the touch command
> seems to get executed, but there is no error, and the timestamp does not
> update which leads me to believe that somehow windows prevents the
> command to be executed, even though cron does seem to issue the
> command...
>
> Any ideas on how to make cron work to allow me run programs
> interactively like notepad?

To be honest, making this work is tenuous at best.  MS doesn't want
things to work this way anymore because it's viewed as a security
hole (arguably a valid point).  If you're running XP, then you have
a better chance but, as you've noticed, it's not guaranteed
either.  And it will most certainly stop working if you move to a
later O/S version.  I know.  Not what you wanted to hear and some
additional research and perseverance on your part may unearth a
solution that works for you.  But there's no magic bullet here,
sorry.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019