delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/08/02/12:06:54

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:mime-version
:content-type; q=dns; s=default; b=ptyLo8gVs/rK9wkXVaM6isgU/uX9C
8Kn/roBlnA5UlnETSK4rx0V0Sn9m4uFuRyOxXBrAJdolPJ2qlNQHGls3cKmKVLht
9bQ7yWx8RIiy3S2YTMTLsQsSQO+TDPKNjR8ja4OH+9R65OTccm5l3q/OBI23m17n
vgMKqeU7nEZ4qo=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:mime-version
:content-type; s=default; bh=mcg5bXgcjQA/kZVsH8C5DU8nyzA=; b=cLy
7iFhuNtuMdt1xuXglDEoKqNiAvnakskmZp6lfIicQ5exXy9/kv9PCr4ZUCbKPnoh
gUPRTDlKevhoowT1KHVw8/Bkh1/w9kvM1uqOxlwRwr/zw2jNQ/QxGJnHXWOiafiX
rI3uKEWB5SOXQIfeY/6EEnFi5jEXZ6/AOKAYhdc4=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_LAZY_DOMAIN_SECURITY,KAM_OTHER_BAD_TLD autolearn=no version=3.3.2 spammy=Hx-languages-length:571, UD:bash.exe, bash.exe, bashexe
X-HELO: blaine.gmane.org
To: cygwin AT cygwin DOT com
From: Oleksandr Gavenko <gavenkoa AT gmail DOT com>
Subject: Hiding console when running Cygwin utility from Task Scheduler.
Date: Wed, 02 Aug 2017 19:06:14 +0300
Lines: 18
Message-ID: <86o9ryymx5.fsf@gavenkoa.example.com>
Mime-Version: 1.0
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (windows-nt)
X-IsSubscribed: yes

I prepared backup task in Bash script and added task to run it in Windows Task
Scheduler:

  Executable: c:\opt\cygwin\bin\bash.exe
  Params: c:\home\backup\backup-job.bash

Each time job run I see console screen. 'procmon' shown that it is::

  \??\C:\Windows\system32\conhost.exe 0xffffffff -ForceV1

Seems each Cygwin utility brings console into foreground. I also tested with:

  c:\opt\cygwin\bin\yes.exe

How can I prevent console to be shown when bash started from Task Scheduler?

-- 
http://defun.work/


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