Web lists-archives.com

Re: cron running but not executing user crontab




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