This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: cron running but not executing user crontab
- From: Brian Inglis <Brian dot Inglis at SystematicSw dot ab dot ca>
- To: cygwin at cygwin dot com
- Date: Mon, 15 Jan 2018 15:08:09 -0700
- Subject: Re: cron running but not executing user crontab
- Authentication-results: sourceware.org; auth=none
- References: <c09e8f04-7aa9-d31c-9c28-67669a0b979e@gmail.com>
- Reply-to: Brian dot Inglis at SystematicSw dot ab dot ca
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