image
image

|


Go Back   macosx.com > Mac Help Forums > Switchers (Windows to Mac Converts)

Reply
 
Thread Tools
  #1  
Old January 22nd, 2007, 12:20 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
kraylus is on a distinguished road
using crontab to run workflow apps i've created?

in windows i had task manager to schedule certain tasks at a specific time and at specified intervals. apple has this thing called automator (which i hear is only as of this past major release of the OS). i didnt get it at first, but after a few google sessions, i understood the dynamics and began creating helpful little workflows.

i then saved them as applications so they appear in my home dir as filename.app. i realized that that was where automator's usefulness stopped. i could specify a task, but not when and how often to run it. being a former linux advocate i remembered that nifty little tool, cron!

after some google'ing, i found an older post saying that it was indeed possible to run these *.app files using dcron or anacron. google'ed a refresher on simple crontabs and added this via crontab -e

Quote:
0,30 * * * * /Users/myhomedir/RTdesktop.app
@hourly /Users/myhomedir/STdesktop.app
one changes the wallpaper and one takes a screenshot every 30min and sends it to my www folder. i saved the file and checked crontab -l and it showed me the two entries.

but... it's not working. is there some fundamental piece i've overlooked? i know that these workflows function properly as i've tested them thoroughly awhile ago, i had one in my startup list to have a new wallpaper everytime i turned the machine on. so i KNOW that one works. i know that the path specified in the crontab is the path where those files exist. checked caps and everything. i'm at a roadblock.

any help is appreciated!

ryan

Last edited by kraylus; January 22nd, 2007 at 03:09 AM.
Reply With Quote
  #2  
Old January 22nd, 2007, 12:51 AM
macbri's Avatar
Mac (r)evolution
 
Join Date: Jun 2005
Location: Ireland
Posts: 247
Thanks: 1
Thanked 0 Times in 0 Posts
macbri is on a distinguished road
Applications aren't executable via a shell command since they are actually directories whose contents are layed out in a specific way, and which "look like" applications to the Finder.

Try using the open command to launch these applications:

Code:
30 * * * * open /Users/myhomedir/RTdesktop.app
@hourly open /Users/myhomedir/STdesktop.app
Reply With Quote
  #3  
Old January 22nd, 2007, 12:55 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
kraylus is on a distinguished road
on closer inspection i come to find that the cli views these *.app files as folders (granted i knew that they were just big package of stuff, but figured you have to invoke a special... well, whatever). digging inside i figured out which piece you actually need to invoke with cron in order to run your workflow.

Quote:
0,30 * * * * /Users/myhomedir/RTdesktop.app/Contents/MacOS/RTdesktop
@hourly /Users/myhomedir/STdesktop.app/Contents/MacOS/STdesktop
to test this, you can do

Quote:
cd ~/STdesktop.app/Contents/MacOS/
./STdesktop
that will execute the program unix style.

so yay! it works! check it out!. updated every 30 min. 24/7/365.

hope this bit of info helps others,

ryan

Last edited by kraylus; January 22nd, 2007 at 03:09 AM.
Reply With Quote
  #4  
Old January 22nd, 2007, 12:56 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
kraylus is on a distinguished road
Quote:
Originally Posted by macbri View Post
Applications aren't executable via a shell command since they are actually directories whose contents are layed out in a specific way, and which "look like" applications to the Finder.

Try using the open command to launch these applications:

Code:
30 * * * * open /Users/myhomedir/RTdesktop.app
@hourly open /Users/myhomedir/STdesktop.app
oh hey, that works too. well hot damn! old school linux rekindled and i dont have to mess with making my own kernels to get my fancy hardware working. im so happy. money well spent.

Last edited by kraylus; January 22nd, 2007 at 01:02 AM.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 08:53 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.