Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [crontab]

The tag has no usage guidance.

1
vote
1answer
25 views

change default editor for command line tasks?

I want to create a cron job. Launching a terminal window, and entering crontab -e opens my current crontab, but opens it in the editor vi. I would prefer to use the nano editor. How do I configure ...
0
votes
1answer
56 views

Crontab didn't work as intended

I set crontab but nothing happened, crontab -l 03 04-22 * * * python /me/radio_alarm.py What's the reason, the command works as intended in Linux.
2
votes
1answer
71 views

Run backup script at any time every weekend (using launchd?)

I recently lost configuration of one of my IDEs (deleted it myself, I am very smart). I had a backup but it was a few months old. I have a script to backup all my config and push it to GitHub. I was ...
1
vote
1answer
115 views

Can't open crontab

I tried running crontab on my Mac for the first time and got the following: $ crontab -e crontab: no crontab for User - using an empty one crontab: subl -w: No such file or directory crontab: "subl -...
0
votes
1answer
433 views

Run cron script at wakeup [duplicate]

I would like to run a script at wakeup. So my laptop is sleeping, I open the lid, and the script should run immediately or within the minute after wakeup. This script should run at startup as well, as ...
1
vote
1answer
158 views

Stop cron daemon “symmetrical.xm” error messages in Terminal mail

After upgrading to High Sierra (I think) I've started receiving the following message almost every time I start up Terminal: You have new mail in /var/mail/MyUsername I had some problems upgrading ...
1
vote
2answers
4k views

cron and “command not found”

I'm setting up a cron job to run an executable bash script which contains a pypdfocr command. Whenever I manually execute the script everything works as expected, if instead I use cron with this ...
1
vote
2answers
393 views

rsync cron job for backup not working

I'm trying to run a backup from one HDD to another at 10pm everynight on a Mac Pro. I have tested the rsync and it backups just fine outside of the cron table. Here is what I have and it's not running ...
1
vote
1answer
71 views

save mysql backup to afp network drive fails as cron job

For some strange reason I am not able to save a generated mysql backup via mysqldump to an afp network drive as a cron job. If I call the shell script as root user (login via sudo su in terminal), it ...
1
vote
1answer
170 views

Bash script for /etc/crontab

I want to run after every reboot, with no user logged kextunload /System/Library/Extensions/AppleHDA.kext I tried to do a bash script here : #!/bin/sh PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/...
0
votes
1answer
422 views

Crontab and session locked

I would like to execute a script on my machine every five minutes, even when I am not in front of my mac OS X Yosemite. Therefore, I would like to lock my session and shut off the screen while the ...
3
votes
0answers
29 views

How to force Wi-Fi to rescan available sources and reconnect to a fixed named source from crontab?

I have a server computer running macOS and sometimes is using Wi-Fi only in evenings. The room's router supporting the Wi-Fi source is set to automatically reboot weekly. So when that happens, the Wi-...
0
votes
1answer
261 views

How to reconnect VPN by using Tunnelblick from command line?

The use case is that I need a particular VPN connected at all times on one of my servers which runs macOS. It's set up with Tunnelblick. And I know how to re-connect to it manually using Tunnelblick ...
1
vote
2answers
704 views

How to get macOS Wi-Fi device name programmatically in Bash script?

bash% networksetup -listnetworkserviceorder An asterisk (*) denotes that a network service is disabled. (1) SAMSUNG Modem (Hardware Port: Modem (SAMSUNG_MDM), Device: SAMSUNG_MDM) (2) Ethernet (...
0
votes
2answers
859 views

How to access Keychain of my user from cron?

security list-keychains print: "/Users/vitaly-zdanevich/Library/Keychains/login.keychain-db" "/Library/Keychains/System.keychain" but the same command from cron return: "/Library/Keychains/System....
0
votes
1answer
956 views

How to run AppleScript in a Crontab?

I am using OS X 10.11.5, I have a crontab file under '/tmp/crontab', in which it contains: 01 10 * * * /Users/Jhon/Desktop/somescript.scpt When I run crontab -l I get output as no crontab for Jhon ...
1
vote
2answers
563 views

How to run script using cron or launchd for Guest user account in El Capitan

I could not find a way of executing a script for the Guest account during login which executes every minute. They say using cron daemon is deprecated so it looks like I will be using launchd with ....
2
votes
0answers
48 views

Do I really need a huge plist file to replicate this cron job?

I am looking to create a launchd job that will execute Monday through Friday at 7:32am, 8:32am, and 2pm. Do I really need a plist that has an array of 15 <dict> elements for every combination of ...
1
vote
0answers
57 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....
1
vote
2answers
9k views

Crontab task “LSOpenURLsWithRole() failed … with error -600 for the file …”

I just moved to a new MacBook with El Capitan and trying to set up my crontab to do backup tasks. Here is how I have it set up (via crontab -e) 40 7 * * * /Users/myusername/daily.sh "daily tasks run ...
7
votes
2answers
518 views

How to automatically deliver /var/mail/USER to my Gmail?

My cron jobs sometimes sends mail to /var/mail/USERNAME. I normally read it by log on the Mac computer and run mail command to read and delete these mails. But how to deliver/forward such mails to ...
1
vote
1answer
2k views

Will a crontab job wake OS X up from sleep?

Since OS X has its own task scheduler, launchd, it appears that crontab is a relic. Hence I'm wondering: Will a cron job (crontab) wake OS X up from sleep? In case it matters, I'm on Yosemite 10.10....
1
vote
1answer
570 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
0answers
173 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 ...
1
vote
1answer
189 views

Why doesn't crontab run if screensaver is on?

I want to run a Crontab on OS X 10.11.1 (El Capitan). I'm running the command: env EDITOR=nano crontab -e to enter the crontab with nano as the editor. Then I create my cronjob that looks like ...
0
votes
1answer
147 views

Crontab stopped running after upgrading to mac os 10.8.5

Pls advise what needs to be done to run the crontab on mac 10.8.5. Here is my problem. I had a crontab running smoothly on my mac 10.6.8. Now, after upgrading to 10.8.5, the crontab does not run ...
1
vote
1answer
113 views

Using osacript to access Finder from crontab (or from non-interactive session)

I have a script that generates a dmg file from my application bundle. This is generated every night from our subversion repository. If would be interesting to set up things like the DMG's window size,...
3
votes
2answers
3k 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
1k 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 ...
2
votes
1answer
85 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
166 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 ...
1
vote
1answer
327 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 ...
6
votes
2answers
4k views

Root crontab won't save

I'm trying to add a crontab entry to my root user's crontab. I'm able to add an entry without issue to my regular user's crontab, but when I su to root user and try adding a crontab entry it does not ...
0
votes
4answers
307 views

print user's crontab

How can I print out my crontab? Under Linux this can be done using crontab -l, however, running crontab -l under Mac OS X produces no output whatsoever and exits cleanly. Here's my crontab: 0 9,10,...
0
votes
1answer
79 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 ...
0
votes
2answers
513 views

Running Applescript using cron jobs not working

I'm new to conjobs and applescript but I have the script done correctly i believe. (any critique is welcome) I don't want to bloat my calendar with events to do this because I use my calendar for ...
3
votes
1answer
2k 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. ...
2
votes
1answer
615 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 ...
0
votes
1answer
711 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/...
5
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 ...
26
votes
3answers
18k views

Where is my crontab file?

I want to edit my crontab file to schedule a script. Where do I find it?