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

  Unix/Linux 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 Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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 Unix and Linux 10-03-2012
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 4 March 2015, 4:48 PM EST
Location: NM
Posts: 10,395
Thanks: 323
Thanked 848 Times in 787 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 Unix and Linux 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 Unix and Linux 10-04-2012
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 4 March 2015, 5:19 PM EST
Location: Saskatchewan
Posts: 20,346
Thanks: 870
Thanked 3,564 Times in 3,329 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 Unix and Linux 10-05-2012
xbin xbin is offline
Registered User
 
Join Date: Feb 2007
Last Activity: 3 March 2015, 7:40 AM EST
Posts: 112
Thanks: 5
Thanked 23 Times in 23 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 Unix and Linux 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 11:18 AM.. Reason: Choice of words
Sponsored Links
    #7  
Old Unix and Linux 10-05-2012
xbin xbin is offline
Registered User
 
Join Date: Feb 2007
Last Activity: 3 March 2015, 7:40 AM EST
Posts: 112
Thanks: 5
Thanked 23 Times in 23 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 Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image 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 01:37 AM
Script is not working from cron while working manually anuragpgtgerman Shell Programming and Scripting 3 01-23-2012 02: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 06:18 PM
script not working...select utility mobydick Shell Programming and Scripting 6 05-08-2008 07:33 AM
tar utility Cameron UNIX for Dummies Questions & Answers 6 04-04-2002 08:00 PM



All times are GMT -4. The time now is 12:05 AM.