6

I am trying to set-up cron on my CYGWIN installation on a Win7 box. I am using the procedure mentiond here:

How do you run a crontab in Cygwin on Windows?

This is how I try to start the cron-service:

> cygrunsrv -I cron -p /usr/sbin/cron -a -D

The response that I get is:

cygrunsrv: Error installing a service: OpenSCMManager: 
Win 32 error 5: Access denied

Any tips on how to proceed?

Community
  • 1
  • 1
jansb000
  • 61
  • 1
  • 3

1 Answers1

12

Make sure you are starting Cygwin with Administrator privileges. Right click on your Cygwin shortcut, then 'Run as Administrator'.

Jeremy
  • 121
  • 4
  • When you have sufficient privileges, this should be a comment. – Diego C Nascimento Sep 24 '13 at 21:14
  • 2
    @DiegoCNascimento: why should it be a comment? Assuming it works, it's an answer. – Keith Thompson Sep 24 '13 at 22:18
  • @KeithThompson because it has some doubt about it. "Make sure you are starting Cygwin with Administrator privileges". What about if the user has running as admin? – Diego C Nascimento Sep 25 '13 at 22:12
  • 1
    @DiegoCNascimento: If it's not working now, and running Cygwin with Administrator privileges fixes it, then this is an answer. (If not, then it's merely an incorrect answer.) – Keith Thompson Sep 25 '13 at 22:27
  • @KeithThompson so, instead of bet an answer that can be the correct one, just ask in a comment "are you running with administrative privileges?". If not, then put the answer. – Diego C Nascimento Sep 25 '13 at 22:32
  • 6
    I think that the world in general (and stackoverflow in particular) already has enough Thought Police. There's not much doubt in context that this answer is correct, and should be posted as an answer. – Stabledog Dec 28 '13 at 18:22