Re: Crontab/Scheduled tasks
Re: Crontab/Scheduled tasks
- Subject: Re: Crontab/Scheduled tasks
- From: David Remahl <email@hidden>
- Date: Thu, 26 Dec 2002 20:45:09 +0100
Third question is, if there is any possibility to know whether my was
started by crontab or by the user?
I suppose you could look at the time and make a probabilistic guess.
In your crontab, make sure you pass an argument to your application
when starting it.
30 5 1 * * chmod007
/Applications/YourApp.app/Contents/MacOS/YourApp -startFromCron
Then in your application programming, you check the list of arguments
passed to your application (- [NSProcessInfo arguments]) and see if the
argument from the crontab was passed to the application.
/ Sincerely, David Remahl
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.