Re: cron running but not executing user crontab

2018-01-15 Thread René Berber
On 1/15/2018 2:48 PM, Chris Johnson wrote:

> Bit of a conundrum here.  Running WIN7 and cygwin64.  Have the terminal
> running and Perl is installed and runs.  AFAIK, that all works.  Used
> cygrunsrv to get cron going.

Not sure if I remember this right, but there is a cron-config in the
package, and that is what you are supposed to use to install it as a
service (and set a proper daemon user, file & dir access, etc.)  You
probably will have to undo whatever you did with cygrunsrv.

Better read /usr/share/doc/Cygwin/cron-4.1-65.README to be sure.

Hope this helps.
-- 
R. Berber


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



Re: cron running but not executing user crontab

2018-01-15 Thread Brian Inglis
On 2018-01-15 13:48, Chris Johnson wrote:
> Bit of a conundrum here.  Running WIN7 and cygwin64.  Have the terminal 
> running
> and Perl is installed and runs.  AFAIK, that all works.  Used cygrunsrv to get
> cron going.  I can see cron in a ps -af in the terminal.  I set up a crontab 
> for
> my user and it's in /var/cron/tabs by using crontab -e.
> 
> Doesn't seem to be running anything in the crontab.  I had wanted to run a 
> Perl
> script in a Windows Directory outside the cygwin structure but using the
> /cygdrive/c etc path.  Ain't working.  Even tried the simplest thing I could
> think of and created a line date > dt.txt on it.  Normally, under *nix this 
> would put the results of date in dt.txt in the home directory.  Not there.

Use /proc/cygdrive/c/... in case it ever changes, and specify absolute paths for
scripts and commands, as only minimal environments are setup, and
non-interactive shell startup scripts run.
Might need to specify other environment variables required in the crontab.
Ensure your perl script has Cygwin +x permissions and hashbang line.

> Just isn't running anything as far as I can tell.
> 
> Any suggestions.  I'd like to get this working.  Want am I missing? Help 
> appreciated.  Thank you

Add cron users to /var/cron/cron.allow (and maybe also a cron group), or touch
/var/cron/cron.deny to allow all users: see crontab(1).
Check /etc/crontab and /etc/cron.d/* are owned and writable only by the crond
user if they exist; /var/run/cron.pid and /var/log/cron.log exist and are owned
and writable only by the crond user; /var/cron/tabs/* exist and are owned by
their users and writable only by their owners; /var/run/cron.pid contains the
cron pid, and see what's in /var/log/cron.log.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

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



cron running but not executing user crontab

2018-01-15 Thread Chris Johnson
Bit of a conundrum here.  Running WIN7 and cygwin64.  Have the terminal 
running and Perl is installed and runs.  AFAIK, that all works.  Used 
cygrunsrv to get cron going.  I can see cron in a ps -af in the 
terminal.  I set up a crontab for my user and it's in /var/cron/tabs by 
using crontab -e.


Doesn't seem to be running anything in the crontab.  I had wanted to run 
a Perl script in a Windows Directory outside the cygwin structure but 
using the /cygdrive/c etc path.  Ain't working.  Even tried the simplest 
thing I could think of and created a line date > dt.txt on it.  
Normally, under *nix this  would put the results of date in dt.txt in 
the home directory.  Not there.


Just isn't running anything as far as I can tell.

Any suggestions.  I'd like to get this working.  Want am I missing? 
Help  appreciated.  Thank you



--

Chris Johnson   rchristopherjohn...@gmail.com
Ex SysAdmin, now, writer/The hardest thing in this world is to live in 
it.
/(Buffy, the vampire slayer EOS 5)


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