• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Crontab/Scheduled tasks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Crontab/Scheduled tasks (From: Hasan Diwan <email@hidden>)

  • Prev by Date: Re: Omission of % character when loading a string from a file?
  • Next by Date: Re: Omission of % character when loading a string from a file?
  • Previous by thread: Re: Crontab/Scheduled tasks
  • Next by thread: Crontab/Scheduled tasks
  • Index(es):
    • Date
    • Thread