BASH Slow Under Cron Only!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting BASH Slow Under Cron Only!
# 1  
Old 04-03-2015
BASH Slow Under Cron Only!

I've got a BASH script that runs much faster from the command line than when invoked under CRON.

Ideas? Priority? IO?
# 2  
Old 04-03-2015
Please post:
1. the script (or something that exhibits the same behavior)
2. crontab entry

As an offhand guess - it relates to environment variables - for about 90% of cron jobs that have problems the issues are largely environment.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bin/bash - xmessage very slow

Hello, I am showing the start of my script. I am finding that 'xmessage' is taking about 12-15 seconds to show. This in a terminal is very quick '/opt/vc/bin/vcgencmd get_camera'. Is there any way to get 'camera not detected' to show faster. Regards #!/bin/bash s=$(/opt/vc/bin/vcgencmd... (4 Replies)
Discussion started by: mad-hatter
4 Replies

2. Shell Programming and Scripting

Email Notifications on Cron Bash Error Only cp mv rsync

Wondering if anyone can point me to an example of how to setup a bash script that executes cp mv and rsync commands and only sends an email if there were errors with any of those commands and what the errors are. In addition it should email if the cron event to execute the script fails, or in... (1 Reply)
Discussion started by: consultant
1 Replies

3. Shell Programming and Scripting

Bash/cron issues

Hi all, I am trying to run a cronjob to push my files to my git repo once a week and output a prompt to a logfile, my script works fine if I invoke it manually but my cronjob wont run for some reason, I have sourced the file, and restarted my Mac to no avail, right now I believe I have the cronjob... (8 Replies)
Discussion started by: gmenfan83
8 Replies

4. Shell Programming and Scripting

cron can't find bash

Hi, I'm running OS 10.3.9 and am trying to get a cron job to work. When the hourly execution time rolls around the script doesn't run and I get an email from cron saying "/bin/bash: line 1: root: command not found". /bin/bash exists and /bin is included in the PATH. Anyone have any ideas what... (9 Replies)
Discussion started by: mmesford
9 Replies

5. Shell Programming and Scripting

Bash Shell Script and Cron

How can I tell a script to only execute if the other scripts exits successfully? So "script A" executes and if it executes successfully (0),then "script B" will run or else "script A "executes and it exits unsucessfully (1) then "script B" will read return code (1) and will not execute ... (3 Replies)
Discussion started by: metallica1973
3 Replies

6. Shell Programming and Scripting

how do I run bash script using cron job

How do I run bash script using a cron job? I have tried to just write the path of the script, but that didn't work. (1 Reply)
Discussion started by: locoroco
1 Replies

7. Shell Programming and Scripting

bash unix cron + sending sms

Hi all, i'm trying to send an sms (notification sms) via a bash script executing throw crontab. The script works fine, but the sms itsn't sent to me. can you help me to resolve this issue, plz. Thanks. Yes - we probably COULD help you if you WOULD provide us with your script, the... (0 Replies)
Discussion started by: arezki76
0 Replies

8. Shell Programming and Scripting

changing cron using bash script

How can I change the cron entries only for ABC and XYZ from dosomething_1.0.sh to nowchanged_2.0 using a bash script ? Any help will be appreciated. # # ABC 00,05,10,15,20,25,30,35,40,45,50,55 * * * * /mydir/dosomething_1.0.sh 1>/dev/null 2>&1 # # ## # DEF... (4 Replies)
Discussion started by: jville
4 Replies

9. Shell Programming and Scripting

Bash script too slow

I have a bash script that will take approx. 130 days to complete. I am trying to grep a list of 1,144 user ID's out of 41 (1 GB each) files. The 41 files were originally one 41 G file, but that was horrendously too slow.:eek: This is my current file: #!/bin/bash for i in `cat... (11 Replies)
Discussion started by: tigta09
11 Replies

10. UNIX for Dummies Questions & Answers

bash: cron-config: command not found - PLEASE HELP ME!!

Hello All, I have installed Cygwin on Windows XP and working with some Shell scripting work, I have needed to schedule my script using the cornetab and whatever commands such as "cron", "cron-config" are not working in my cygwin shell, I re-installed the Cygwin but the same problem is with... (2 Replies)
Discussion started by: sriya
2 Replies
Login or Register to Ask a Question