The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
0answers
26 views

How to add user's mbox to Mail?

I have a couple of cronjobs running on my Mac. cron will send out mails and put them in my user's mbox, which I can read via the mail command. However, it would be nice to see them in the regular Mail....
0
votes
0answers
29 views

El Capitain 10.11.4: unable to execute rsync script from cron or lauchd

I have a simple rsync script which I want to run every 2 minutes. The script runs fine from command prompt, but failing to execute from cron or launchd. I see system log gets filled with "Service only ...
11
votes
4answers
5k views

ssh-under-cron stops working in OS X 10.7 Lion

Just upgraded from Snow Leopard to Lion, and my cron jobs that use ssh have stopped working. It appears that ssh-agent is no longer functioning as expected. Here's a bowdlerized version of my called-...
1
vote
1answer
94 views

Run a command on a schedule and verify that it has run

I want to run an rsync command each day or more often to back up a raspbery pi on my network to a drive attached to my mac. I see launchd, but I'm very confused about how to get it to work, and I ...
0
votes
0answers
31 views

Stop a cron job from running long after it's scheduled time?

I created a simple script that downloads some videos and I created a cron task to schedule it for overnight: 00 2 * * * ~/script.sh The problem is something happened and it didn't complete (I'm ...
1
vote
1answer
70 views

Setting anacron on Mac - Shell Scripting

I set cron to run script every day using env EDITOR=nano crontab -e where I wrote something like this @daily path/to/sript.script. Now I want to use anacron to be sure that script is going to be run ...
0
votes
1answer
22 views

How to control where script run by cron saves files?

I've got the following cron job that runs at 6 am every morning: 00 6 * * * /Users/username/path/to/script/wget.pl 1; The script, written in perl, fetches the latest files from a website. Within ...
0
votes
1answer
61 views

How can you access Apple Mail from Apple script?

I want to archive old emails ( say, older then 7 days ) from my inbox automatically with an applescript scheduled via cron. To be honest, I am open to other Apple-friendly languages such as Swift or ...
1
vote
2answers
25 views

“Temporary” folder

I often download images, take screenhots, and save files that I am only going to use for a little until it can be discarded. I want to create a folder which deletes the contents inside it every few ...
0
votes
0answers
51 views

Schedule executing tasks based on bash scripts using CronniX

I'm still quite new you Mac and OS X but do have some background about other UNIX based systems, so please excuse for any misunderstandings. My goal is to implement a function that executes certain ...
0
votes
0answers
31 views

Where are crontab files stored in OS 10.8

I've already looked at this question: Where is my crontab file? But there is no real answer except for 10.7. I'm trying to migrate crontab from an old drive that I can't boot so using crontab -e is ...
0
votes
2answers
2k views

Launchd unloading LaunchDaemon

I have a script scheduled to run as LaunchDaemon. Script runs fine when launched manually through terminal. I have two commands sudo launchctl unload -F /Library/LaunchDaemons/com.test.plist sudo ...
0
votes
0answers
24 views

iCal event timing?

I have a Mac script that I use to archive mail nightly. It normally runs at 3am. I never see it happen while it's happening, but it works great. I was diddling with it, and wanted to test it out, so I ...
3
votes
1answer
3k views

Cron doesn't run after installing Mountain Lion. How can I make them run again?

My Cron tasks stopped running after I installed Mountain Lion. How do I get them to run again?
8
votes
4answers
15k views

Cron script not executing on Mavericks

I have configured a user crontab file as follows: */2 * * * * /Users/[my user]/Dropbox/htdocs/auto-update.sh But it won't execute. I waited for, like, 10-15 minutes. Why? Command auto-update.sh ...
7
votes
4answers
15k views

Where is the cron log file in MacOSX Lion?

I want to troubleshoot a cron job that worked fine until a recent modification, but I can't find the cron log file, where is it?
2
votes
1answer
84 views

Bash script with lock folder problems for large files

My script is: #!/bin/bash # Path to a lock folder LOCK_PATH="/Volumes/PROOFS_WATCH/copy.lock" trap 'rmdir "$LOCK_PATH"; exit' 1 6 15 if mkdir "$LOCK_PATH"; then echo "Lock file did not ...
13
votes
4answers
7k views

Schedule multiple wake up times for Mac?

I have systems running Mac OS X 10.5.8 and 10.6.8 that I would like to schedule some cron jobs for with the Cronnix GUI application. I prefer those computers be asleep until the scheduled jobs start. ...
2
votes
1answer
80 views

Cron job fails due to sleeping wifi?

I wrote a cron job to do backups over wifi to another computer. It works perfectly when I'm using the machine, but I prefer to schedule it at night when I'm not using it. The first step is to ping the ...
2
votes
3answers
115 views

Turn off mail notification in terminal

I'm running some cron jobs on my machine and every time I fire up a terminal session I'm getting a 'You have mail.' message. Any way to turn this off?
0
votes
1answer
670 views

OS X Lion mysterious user cron job just does echo “PATH is $PATH”

OS X Lion 10.7.3. Console view of system.log shows log entries for cron jobs defined in my user crontab as expected. Follow this link to view a copy of my user crontab if you want. I inspected /usr/...
1
vote
1answer
358 views

How do I open a URL with a custom scheme in Yosemite with cron and open?

I had a cron job that ran every morning at 10:30 to call into our daily status meeting on Go2Meeting. After I upgraded to Yosemite it stopped working, and I figured out that it was because open -g ...
0
votes
3answers
1k views

How can I set the default browser depending on time of day?

I have a MacBook Pro from work. To keep my browsing history separate, I use 2 different browsers. (Chrome = Work, Safari = Fun) I want to make my default browswer Chrome while at work (9 am to 6pm), ...
2
votes
0answers
165 views

OSX Server: _www user emailing itself every minute

I'm new to OSX Server, and this has me stumped. For some reason _www user is emailing itself every minute. I've tried to restrict it in postfix config, both sending & receiving, i've removed ...
3
votes
2answers
787 views

How to run a cron job each time the previous execution has finished?

I would like to run a Python script each time it finishes and I think I can do this with cron but I am not sure how to do it. The idea is each time the Python scripts ends, it will have to run again ...
1
vote
1answer
692 views

Cron job keeps running, not in any crontabs

Some time ago I set up a cron job that would run a shell script to update my dynamic DNS. I've since done the proper Mac thing and switched over to launchd to handle that job and any other scheduled ...
1
vote
1answer
287 views

AppleScript working until placed in cron; causing Chrome to go unresponsive

Good afternoon. Question: I have a simple apple script telling Google Chrome to open, go to a URL, and enter presentation mode... tell application "Google Chrome" activate make new window ...
2
votes
1answer
72 views

How Can I Log Crontab File Writes

I'm looking for a way to log crontab file writes. A friend of mine pranked me, and did something that occasionally adds */5 * * * * say "deranged" "The current time is `date`" I haven't been able to ...
1
vote
1answer
141 views

Cron configuration on Mavericks

How can I configure cron to send a local email only to the crontab owner with the cron job output. This worked with Lion, could check the cron emails by just running mail in the terminal so I don't ...
2
votes
0answers
203 views

How daylight saving changes are handled in launchd to make sure it execute the the jobs as scheduled through plist?

Since August 2013, I am using Mac Mini with OS X version 10.8.2 as my web server (MAMP stack). I have a few launchd scheduled jobs scheduled through plist. Everything was working fine until Nov 3, ...
1
vote
1answer
324 views

How do I setup a cron job on OSX to launch a website in safari every 4 hours?

How do I setup a cron job on OSX to launch a website in safari every 4 hours? I'm looking to have it open on top of every window. It's basically a reminder for staff.
1
vote
1answer
91 views

emulate Linux's `last -x` on Mac OS X

I'm currently trying to get a missing cronjob runner script thing to work, but it was written for Arch Linux, which is pretty different from Mac OS X, and one of the things that it tries to do is run ...
6
votes
2answers
2k views

What is the difference among the various event schedulers for OS X / Darwin?

I'm confused about the differences among the three (that I know of) tools for scheduling running of code on OS X / Darwin: cron launchcd pmset I understand that cron is largely deprecated, but it ...
2
votes
0answers
518 views

MacBook Pro with lid closed goes back to sleep right after scheduled wakeup

I'm trying to run an app from crontab at 3 in the morning. My 2010 MacBook Pro running OS X Lion 10.7.5 is usually turned off at this time of the night, so I'm setting Energy Saver's scheduled wake up ...
0
votes
1answer
68 views

Scheduling cronjobs at specified time

I have scheduled some jobs in crontab which are to be run one by one, at some specific time. My script for crontab is : 15 10 * * * /Users/sri/files/BatchFF.sh 45 11 * * * /Users/sri/files/BatchGC.sh ...
1
vote
1answer
656 views

Does LaunchAgent prevent repetitive execution of jobs?

I want to automate the execution of a long-running job. It should be launched once per day but only if the prior job isn't still running. Can I accomplish this with launchd and how?
2
votes
1answer
766 views

How can root launch a regular Mac application from a cron job in /etc/crontab?

I want the cronjob to do some things as the superuser, and depending on the result, launch an app as me, the logged-in user. I've tried a bunch of things but nothing I think should work does. ...
1
vote
1answer
369 views

Cron log to Notification bar [duplicate]

I have a couple of cron jobs that I would like to log output to the Notification app in Mountain Lion. I've searched and and figured out how to log cron output by editing the plist file, but nothing ...
0
votes
0answers
468 views

A working applescript fails when running via cron

MacOs 10.8.2 I have 2 applescripts shown below. They are arranged in one shell script to run one after another by using osascript (just to simplify the example). Everything works fine when starting ...
0
votes
1answer
181 views

Lauchd - Run task multiple times between time interval

I want to run a script every 15 minutes between 12:00 AM and 4:00 AM. Is there a way to do that with launchd? I know you can specify and array of dictionaries using StartCalendarInterval to ...
3
votes
3answers
6k views

How can I execute sudo commands as a cron job?

I'm trying to execute a shell script as a cron job. The problem is that my script needs to be run as a super user. I tried it with just writing sudo infront of the command in my crontab file, but it ...
2
votes
1answer
390 views

Use cron to screencapture on Mountain Lion

I want to set cron to capture the current desktop every hour: screencapture -Cd -tjpg ~/Desktop/screen-`date +"%Y%m%d-%H%M"`.jpg I tired this method but it seems doesn't work on Mountain Lion. I ...
1
vote
1answer
959 views

How can I mount disks via cron in Mountain Lion?

Is there a way to mount disks in Mountain Lion that works with cron? The following command works fine from the Terminal: /usr/sbin/diskutil mount disk1s6 But when executed via my crontab, it fails....
1
vote
1answer
2k views

How to make a LaunchAgent with StartCalendarInterval

I want to start replacing crontabs with LaunchAgents. My first attempt is not working. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://...
2
votes
4answers
2k views

cron is failing to run my AppleScript

I have the following code in a text file (myfile.applescript): #! /usr/bin/osascript tell application "Google Chrome" to quit I would like Chrome to shut down each night at 9:15PM, so I added the ...
0
votes
0answers
25 views

Launch program after inactivity [duplicate]

Possible Duplicate: How can I automatically launch an application whenever the Mac goes idle? I'd like to launch an AppleScript/ App after 30 minutes of system inactivity. e.g. no cursor ...
4
votes
1answer
354 views

What is the difference between cron and lauchd?

What is the difference between cron and lauchd? I have always used cron, but I have recently heard that launchd is better. Why? In what ways is cron better? In what ways is launchd better?