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


Buchbinder, Barry (NIH/NIAID) [E] wrote:

r wrote on Sunday, July 27, 2008 11:11 AM:
Saturday 26 July 2008, alle 19:36, René Berber wrote:
r wrote:

How can I execute a script at boot time ?
it's a simple retrieving email script with 'getmail' [snip]
An easy way is to use cron, with 'crontab -e' add a line like this:

@reboot /bin/startup_retrieve_mail.sh > /dev/null 2>&1

Make sure the script is executable, the redirection is optional and
perhaps shouldn't be used at the beginning in case there are error
or unexpected messages, once its working you can put that in.

Another way is to put a shortcut in Windows' Startup folder with the following command line.

c:\cygwin\bin\sh -c /bin/startup_retrieve_mail.sh

This might be preferred by those who do not have any other reason to
run cron.

Does a startup action run when you login or when Windows restarts?


I think they are different things, the cron solution works when cron starts (which could be at any time but the service starts with Windows), your solution doesn't (unless I'm mistaken).
--
René Berber



-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


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