Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Sheduler on a Mac?

Thread Tools
 
Search this Thread
 
Old 29 October 2007, 08:12 PM
  #1  
Simon C
Scooby Regular
Thread Starter
 
Simon C's Avatar
 
Join Date: Sep 2003
Location: At the diesel pump...
Posts: 8,677
Likes: 0
Received 0 Likes on 0 Posts
Default Sheduler on a Mac?

Excuse the newbie question.

Is there a way of scheduling iSync (tiger) to auto kick off to update itself and link in with a paired device?

Cheers


I will master this OS lark
Old 30 October 2007, 03:45 PM
  #2  
Markus
Scooby Regular
 
Markus's Avatar
 
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes on 0 Posts
Default

macosxhints.com - Use cron to automate iSync at non-standard intervals
Old 30 October 2007, 04:11 PM
  #3  
Simon C
Scooby Regular
Thread Starter
 
Simon C's Avatar
 
Join Date: Sep 2003
Location: At the diesel pump...
Posts: 8,677
Likes: 0
Received 0 Likes on 0 Posts
Default

Cheers Markus, what would we do without you


Next dumbass question, whats cron?
Old 30 October 2007, 04:58 PM
  #4  
Markus
Scooby Regular
 
Markus's Avatar
 
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes on 0 Posts
Default

Tron's younger brother

It's a unix time based scheduling service, name comes from the Greek word Chronos, meaning time.

essentially the cron service/daemon reads the crontab file, which contains information on what to run, when to run it and who to run it as (for example run it as the root user).
Old 30 October 2007, 05:11 PM
  #5  
SwissTony
Scooby Regular
iTrader: (19)
 
SwissTony's Avatar
 
Join Date: Mar 2003
Location: In the Doghouse
Posts: 28,226
Received 12 Likes on 3 Posts
Default

you got to admit he's good
Old 30 October 2007, 05:24 PM
  #6  
Simon C
Scooby Regular
Thread Starter
 
Simon C's Avatar
 
Join Date: Sep 2003
Location: At the diesel pump...
Posts: 8,677
Likes: 0
Received 0 Likes on 0 Posts
Default

OK smartar5es!!!!

Is it built within the OS or is it a download app?


Don't forget I'm a photographer not a freaking programmer!
Old 30 October 2007, 05:31 PM
  #7  
SwissTony
Scooby Regular
iTrader: (19)
 
SwissTony's Avatar
 
Join Date: Mar 2003
Location: In the Doghouse
Posts: 28,226
Received 12 Likes on 3 Posts
Default

automator mate

run applescript
Old 30 October 2007, 05:32 PM
  #8  
Simon C
Scooby Regular
Thread Starter
 
Simon C's Avatar
 
Join Date: Sep 2003
Location: At the diesel pump...
Posts: 8,677
Likes: 0
Received 0 Likes on 0 Posts
Default

Cheers swiss. I'll try and not break it tonight
Old 30 October 2007, 05:51 PM
  #9  
Markus
Scooby Regular
 
Markus's Avatar
 
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes on 0 Posts
Default

cron is built into the OS (as it is for many *nix systems). For a GUI to edit things, have a peek at this.

As Swiss says, Automator + Applescript may also be able to do the job.
Old 30 October 2007, 05:52 PM
  #10  
RichB
Scooby Regular
 
RichB's Avatar
 
Join Date: Apr 1999
Location: Bore Knee Muff
Posts: 3,666
Likes: 0
Received 0 Likes on 0 Posts
Default

You can schedule tasks to be run using iCal as well.
Create an automater script and schedule it in iCal - There is an option in automator...
Old 30 October 2007, 10:22 PM
  #11  
stevem2k
Scooby Regular
 
stevem2k's Avatar
 
Join Date: Sep 2001
Location: Kingston ( Surrey, not Jamaica )
Posts: 4,670
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by Simon C
OK smartar5es!!!!

Is it built within the OS or is it a download app?


Don't forget I'm a photographer not a freaking programmer!
Programmer wouldn't use cron. They'd spend 3 weeks writing a standalone application . An admin would spend 5 minutes wrapping it in a shell script and calling it from the crontab.
Old 01 November 2007, 09:20 PM
  #12  
Simon C
Scooby Regular
Thread Starter
 
Simon C's Avatar
 
Join Date: Sep 2003
Location: At the diesel pump...
Posts: 8,677
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by RichB
You can schedule tasks to be run using iCal as well.
Create an automater script and schedule it in iCal - There is an option in automator...
Its iSync I wanted running, and thanks to Markus's links I just managed it!!!

Seriously, downloaded that gui created a job and ran it! Now I have to wait till 19:30 tomorrow and see if it runs by itself without the gui open. Although when I ran it just now. It opened a seperate window which didn't close down after it had finished, which is going to be annoying if it does that when the gui isn't open.

Ideally I don't want to see anything, I just want to hear the beep after the sync.


PS: Markus, have a virtual beer from me
Old 01 November 2007, 09:42 PM
  #13  
Simon C
Scooby Regular
Thread Starter
 
Simon C's Avatar
 
Join Date: Sep 2003
Location: At the diesel pump...
Posts: 8,677
Likes: 0
Received 0 Likes on 0 Posts
Default

It works!!! Well in part.

It opens iSync and updates the phone, but leaves iSync open.


Any command I can put the in the job that will telliSync to close after its done it thing?

This is the current command
osascript -e 'tell application "iSync" to synchronize'
Old 01 November 2007, 10:20 PM
  #14  
Markus
Scooby Regular
 
Markus's Avatar
 
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes on 0 Posts
Default

what you could do is to create an applescript with the following in it:

Code:
tell application "iSync"
synchronize
quit
end tell
Save it somewhere on the disk, maybe in your home folder

then change the line

osascript -e 'tell application "iSync" to synchronize'

to

osascript /path/to/file

I think you can use the browse button to select the script which will put the path in.
Old 02 November 2007, 03:39 PM
  #15  
Markus2
Scooby Newbie
 
Markus2's Avatar
 
Join Date: Aug 2007
Location: Also known as Markus
Posts: 12
Likes: 0
Received 0 Likes on 0 Posts
Default

Alas I cannot currently edit my post.

Ignore the script code I put in there, here is a far better version.

Code:
tell application "iSync"
	
 synchronize
	
  repeat while true
   if syncing then
     -- syncing in progress, we need to wait until completion before quitting
   else
     -- syncing complete, so we can now exit the loop and tell iSync to quit
   exit repeat
   end if
  end repeat
	
 quit
	
end tell
This will launch iSync, start the sync and then check to see what the sync status is. If it's true, meaning a sync is in progress then it'll wait until it's false, meaning the sync is complete, before it then quits iSync.

I've tested the script manually and it works and I see no reason why it'd not work when run via cronnix
Old 02 November 2007, 09:27 PM
  #16  
Simon C
Scooby Regular
Thread Starter
 
Simon C's Avatar
 
Join Date: Sep 2003
Location: At the diesel pump...
Posts: 8,677
Likes: 0
Received 0 Likes on 0 Posts
Default

Trying it now


Let you know in 5 if it does
Old 02 November 2007, 09:31 PM
  #17  
Simon C
Scooby Regular
Thread Starter
 
Simon C's Avatar
 
Join Date: Sep 2003
Location: At the diesel pump...
Posts: 8,677
Likes: 0
Received 0 Likes on 0 Posts
Default

Worked perfectly mate
Old 02 November 2007, 11:03 PM
  #18  
Markus2
Scooby Newbie
 
Markus2's Avatar
 
Join Date: Aug 2007
Location: Also known as Markus
Posts: 12
Likes: 0
Received 0 Likes on 0 Posts
Default

Excellent! Good to know it works
Old 02 November 2007, 11:14 PM
  #19  
Simon C
Scooby Regular
Thread Starter
 
Simon C's Avatar
 
Join Date: Sep 2003
Location: At the diesel pump...
Posts: 8,677
Likes: 0
Received 0 Likes on 0 Posts
Default

Cheers for the assistance, well doing it all for me



Now to install 10.5 and screw it all up!
Old 03 November 2007, 02:14 AM
  #20  
Markus2
Scooby Newbie
 
Markus2's Avatar
 
Join Date: Aug 2007
Location: Also known as Markus
Posts: 12
Likes: 0
Received 0 Likes on 0 Posts
Default

Run Disk Utility from the Installer DVD *before* doing the install, and repair permissions and repair the disk. Make sure if you have APE from Unsanity installed that you remove it. I'd also unplug any firewire/usb devices you don't need.

Most important thing, backup before you upgrade, just in case, and make sure whatever you use to backup has a 10.5 version, should you get a base 10.5 on and need to restore things from the backup. I know Retrospect 6.1 works under Leopard (it's currently doing a full backup on my disk as I type).
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
S3LDM
Wales
56
09 December 2015 01:10 PM
S3LDM
ScoobyNet General
32
01 December 2015 09:35 AM
Wish
Computer & Technology Related
3
30 September 2015 10:39 PM
Littleted
Computer & Technology Related
0
25 September 2015 08:44 AM
pimmo2000
Computer & Technology Related
2
21 September 2015 12:04 PM



Quick Reply: Sheduler on a Mac?



All times are GMT +1. The time now is 03:48 PM.