Using at utility on 10.8.2 not working | Unix Linux Forums | OS X (Apple)

  Go Back    


OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple.

Using at utility on 10.8.2 not working

OS X (Apple)


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 10-03-2012
sakurashinken sakurashinken is offline
Registered User
 
Join Date: Dec 2011
Last Activity: 2 March 2013, 1:55 AM EST
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Using at utility on 10.8.2 not working

I am a beginner, trying to get basic background utilities like at and cron to work on mac os x.

I am typing the following at the prompt:

at now + 1 minute
open -a textedit
^D

nothing happens at the appointed time.

What to change?
Sponsored Links
    #2  
Old 10-03-2012
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 31 August 2014, 5:38 PM EDT
Location: NM
Posts: 10,180
Thanks: 275
Thanked 785 Times in 734 Posts
start with EXACTLY as it is in the example

Code:
at now <<!
cd /home/mydirectory
ls -ltr > /tmp/my.lis
!

If that fails to create the /tmp/my.lis, you need to start the cron daemon.
Keep working until the above example works.

Two points:
you cannot use any interactive program like an editor or one that creates a window like a web browser.

Post back here if you have trouble.

The <<! bit is called a here document. Read up on them so you know what is going on.
Sponsored Links
    #3  
Old 10-04-2012
sakurashinken sakurashinken is offline
Registered User
 
Join Date: Dec 2011
Last Activity: 2 March 2013, 1:55 AM EST
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
I did that, and it still didn't work. When you say "you need to start the cron daemon" do you mean I can't use at and need to use cron or that at relies on the cron daemon?

If so, what is a good way to start cron? classic crontab -e and enter some jobs? I'm working with a classic unix book, and thus far have found everything to work through the bash terminal in a pretty predictable way, until now. I know that Apple built a bunch of tools on top of the basic unix and that laucnhd has taken the place of cron and other traditional daemons - is that what we are dealing with here?
    #4  
Old 10-04-2012
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 2 September 2014, 11:15 AM EDT
Location: Saskatchewan
Posts: 19,273
Thanks: 774
Thanked 3,237 Times in 3,035 Posts
Quote:
Originally Posted by sakurashinken View Post
I did that, and it still didn't work.
In what way did it "didn't work"? Did it print any messages or anything?
Sponsored Links
    #5  
Old 10-05-2012
xbin xbin is offline
Registered User
 
Join Date: Feb 2007
Last Activity: 7 August 2014, 11:02 AM EDT
Posts: 105
Thanks: 4
Thanked 20 Times in 20 Posts
at is disabled in OS X. You can enable at with the following command ->

Code:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist

and disable at with ->

Code:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.atrun.plist

The Following User Says Thank You to xbin For This Useful Post:
Don Cragun (10-05-2012)
Sponsored Links
    #6  
Old 10-05-2012
sakurashinken sakurashinken is offline
Registered User
 
Join Date: Dec 2011
Last Activity: 2 March 2013, 1:55 AM EST
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks. That's what I needed. I assume cron can be cryogenically unfrozen in a similar way.

Last edited by sakurashinken; 10-05-2012 at 10:18 AM.. Reason: Choice of words
Sponsored Links
    #7  
Old 10-05-2012
xbin xbin is offline
Registered User
 
Join Date: Feb 2007
Last Activity: 7 August 2014, 11:02 AM EDT
Posts: 105
Thanks: 4
Thanked 20 Times in 20 Posts
In earlier versions of OS X cron is working. You just need to create a crontab. You can test if cron is running with

Code:
sudo launchctl list | grep 'cron'
#output
379	-	com.vix.cron

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script not working in cron but working fine manually jasperux Shell Programming and Scripting 2 07-05-2012 12:37 AM
Script is not working from cron while working manually anuragpgtgerman Shell Programming and Scripting 3 01-23-2012 01:54 PM
How to Unzip a file using unzip utility for files zipped without zip utility ? Sabari Nath S Shell Programming and Scripting 1 12-11-2009 05:18 PM
script not working...select utility mobydick Shell Programming and Scripting 6 05-08-2008 06:33 AM
tar utility Cameron UNIX for Dummies Questions & Answers 6 04-04-2002 07:00 PM



All times are GMT -4. The time now is 12:42 PM.