This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crontab issue

Igor Pechtchanski wrote:

On Mon, 20 Sep 2004, Mogyorósi István wrote:


I spent quite a lot of time reading the subject and I still dont have
clear sight on the problem. It is probably a permission/access sync
issue between Cygwin and NT. But my case is NOT a network drive.

Case 1,
crontab -e [ logged in as Administrator ]
20 12 * * * /home/Administrator/ [ my own script to exec ]
it works with the result written in my home directory. is `date >mydate.txt`

It's a good idea to specify the absolute paths for any commands or output

Case 2,
crontab -e [ logged in as Administrator ]
25 12 * * * /cygdrive/e/otherpath/ [ my second script to exec ]
this does not work.
My Error message in Eventlog is:
bla .. bla .. /usr/sbin/cron : PID 2356 : (Administrator) CMD
(/cygdrive/e/otherpath/ 2>&1)

Hmm, looks like it *is* getting executed, but the output is lost?  See
the previous comment.

Ok. The output needs absolute path too. The script works.
But, my *real *script contains relative paths to config files,
and password files.
I dont think it worth to extend the PATH variable in
crontab file. So I made a second script with absolute path
references in the mentionned real script v.2
all paths were updated in $cygpath/actual_path format,
and VOILÁ ! Job done.

Thanks Igor !

The access permissions for both shell scripts are identical.
The only difference is the path to execute.

Can you execute the latter script from the command line as Administrator?
If not, are the access permissions on both *paths* sufficient?  For a
script to be executable, all the components in the path to it have to be
reachable (i.e., the directories have to have at least the execute

If I install the service as Administrator, and try to start it
with the Service Control Manager it fails to start and
I get the error message in the Event Log:
... bla bla .. Cygwin_cron : PID 2260 : starting service
'Cygwin_cron' failed : execv: 1 , Operation not permitted.

This is a different symptom -- most likely the necessary DLLs in your /bin
are not executable by non-owners (i.e., SYSTEM, which is the user cron
will run under when installed as service). A "chmod -R a+X /bin" should
help (you might also need to fix permissions for other files/directories
under /var, and maybe /lib, /share, and /etc).

fn;quoted-printable:Istv=C3=A1n Mogyor=C3=B3si
org:TeleDataCast Kft.
adr:;;HAuszmann Alajos u. 2.;BUDAPEST;;1117;HUNGARY

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]