0
votes
0answers
27 views

Cron bash script skips second do/done set

I have a script that checks IPs for ping reply then tries to run an snmpwalk on them. I am trying to schedule the script to run weekly in cron. When I run the script in the shell, it runs perfectly. ...
-2
votes
1answer
51 views

Crontab not working to send email [closed]

I have CentOs 6.5 running on a VPS Host. I installed crontab and email using the below commands yum install vixie-cron service start crond chkconfig crond --levels 235 on yum install sendmail ...
0
votes
1answer
265 views

Can't run AWS CLI from CRON (credentials)

Trying to run a simple AWS CLI backup script. It loops through lines in an include file, backs those paths up to S3, and dumps output to a log file. When I run this command directly, it runs without ...
0
votes
1answer
182 views

Shell script only executes partially when run with CRON [duplicate]

I've written a shell script that does the following: Retrieve mail from a POP3 account (using GetMail) Save a copy of that email to S3 (using AWS CLI) Email me the filesize of the email The ...
0
votes
4answers
274 views

cron job executing script [duplicate]

I have created a script that works as expected in shell but cron job does not seem to run it. when I check my cron mail, I see that it prints "hltv is not running" but does not create a screen ...
0
votes
1answer
54 views

cron to anacron migration process

I have a script that I want to run nightly on my lab's RHEL 5 and 6 workstations, so I'm deploying the script to each system's /etc/cron.daily/ directory and making it executable there. But some ...
0
votes
1answer
234 views

(bsnmpd), uid 0: exited on signal 6 (core dumped) / Syntax error: word unexpected (expecting “then”)

I'm using FreeBSD 9.2-RELEASE: # uname -a FreeBSD f9.alexus.org 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC ...
0
votes
1answer
294 views

Cron job does not generate expected log file

I'm trying to execute a shell with crontab. The cron job executes the shell but doesn't generate the log file i need. This is what i'm using for my cron: 10 * * * * /home/user/3nvo.sh This is a ...
0
votes
1answer
182 views

Why is this cron job with shell script failing? [duplicate]

I created a cron job to do a daily backup, to store it in the directory /backups This backups directory is located at the root [/] of the VPS server and is a separate backups partition provided by ...
0
votes
3answers
1k views

Cant run rc.local manually and doesn't run automatically on ubuntu

This is quite a simple one. I created an rc.local file here: /etc/rc.local I made it executable. However, it doesn't run when I boot the server. I can see it in the directory and when I try to run ...
0
votes
1answer
215 views

Mysql select query not generating result on cron but is ok via terminal

We have a C program (source is below). We compile it with: gcc -Wall -Wextra -g $(mysql_config --cflags) get1ReceiveSource.c $(mysql_config --libs) -lrt -o get1Receive The select give results ...
0
votes
6answers
3k views

Bash script runs manually, but fails on crontab

I'm a newbie to shell scripting. I have written a shell script to do incremental backup of MySQL database.The script is in executable format and runs successfully when executed manually but fails when ...
2
votes
3answers
1k views

Reboot if tomcat7 service is not responding

I am running a web app on a Tomcat server. There is a hard-to-detect problem within the server code that causes it to crash once or twice everyday. I will dig in to correct it when I have time. But ...
0
votes
1answer
90 views

Parenthesis in cronjob results in error

I am trying to run the following cronjob and I am getting the following error: /bin/sh: -c: line 0: syntax error near unexpected token `)' for the line: mysqldump --opt -Q -h localhost ...
2
votes
2answers
478 views

Cron not running CentOS

What am I doing wrong here? Trying to set a cron job to run a shell script but it won't work. I entered the below after doing crontab -e. It does show up when doing contrab -l. 0 2 * * * root ...
1
vote
3answers
552 views

changing default shell to /bin/bash of at job scheduler like in CRON

Is there a way to change the initial shell used by the atd job scheduling service? Esp. in Ubuntu. at by default uses /bin/sh in every Linux and Solaris I've deployed products on. GNU's crontab ...
2
votes
1answer
81 views

Dropping to cron like environment for debug purposes?

Cron scripts are executed in "limited" environment, PATH and co are very restrained. How can I emulate this env setting from interactive shell so that I could debug scripts that work great from user ...
0
votes
1answer
117 views

Assistance with a backup solution.

I am currently needing to create a backup of something on my server. I zip the entire folder and it's about 1.5gb big...it has to be backed up every hour.... Alright so the size of the backup is ...
0
votes
2answers
130 views

Creating a backup script involving screens and java?

Hi guys I use centOS 64bit 5.7 and I need to create a backup script What I want it to do: screen -r example command into java pause for x amount of seconds exit screen zip/rar a folder which and ...
0
votes
2answers
841 views

shell script within crontab

I can run the following shell script from command prompt as expected: /bin/sh -xv /home/shantanu/backup_transfer.sh But when I set it in a cron, it does not execute correctly. There are 2 ...
0
votes
1answer
373 views

pfSense command to delete stale SAD

I'm experiencing an issue with pfSense where duplicate SAD's are getting created after rekeying, forcing me to manually go ahead and delete the old SAD's. It's not a huge issue but it does get to be a ...
6
votes
2answers
2k views

My cron tasks report command not found [duplicate]

This is the contents of my crontab file: 0 0,6,12,18 * * * cd /var/www/app/current && backup perform --trigger db_backup --config_file config/backup.rb --data-path db --log-path log ...
0
votes
1answer
584 views

getting error Too many open files in system

I am running a cron and output coming to my id and getting below as output: /bin/sh: /usr/bin/php: Too many open files in system Cron runs every 5 mins. Have checked /var/logs/cron and cron is ...
0
votes
3answers
201 views

Shell script does not work with cron

I have this shell script at /usr/local/1.sh: #!/bin/sh wget -r -np --user=peter --password='123' ftp://67.225.87.95/ -p /test/ If I run it using # sh 1.sh the script executes ok and does what ...
-2
votes
1answer
219 views

shell script doesn't run correctly in cron [closed]

I want to call a shell script I wrote from a cron. The shell script uses the program Linkchecker. If I run the shell script from the terminal it works just fine. However, when cron runs I get the ...
0
votes
1answer
137 views

Escaping special characters in cron

I use the following commands to copy the entire directory to another server. Sending server: cd /var/log/ && tar c mysql > to_analyse.tar && nc 10.10.10.99 1236 < ...
0
votes
2answers
439 views

Cron process not starting

I have an ec2 image created with cron jobs. These jobs fail to run; I discovered the cron process in itself has not started. So, I included /usr/sbin/cron in /etc/rc.d/rc.local and created another ...
8
votes
2answers
4k views

Run command as Linux “system” user (shell = /bin/false)

I created a "system" user in Ubuntu 11.04 (adduser --system) for running certain cron jobs, but sometimes I want to test things out by manually running commands as that user. What's the easiest way to ...
1
vote
1answer
254 views

Server crashes when running shell script

I have a virtual machine running CentOS 5.5 that I use as a streaming server. If I open 4 terminals and do this: terminal 1: # mkfifo pipe1.avi # mkfifo pipe2.avi # ffserver & # ffmpeg ...
1
vote
2answers
911 views

executing a sh script from the cron

I have a test.sh script #!/bin/sh php /home/v/file.php sh /root/x/some.sh when I execute the file as root from command line it works. sh /home/v/test.sh when I set it to crontab -e (is the root ...
6
votes
4answers
5k views

Cron: Only get errors in emails?

I finally set up a realistic backup schedule on my data through a shell script, which are handled by cron on tight intervals. Unfortunately, I keep getting empty emails each time the CRON has been ...
1
vote
2answers
145 views

shell script executes ok on command line but not from cron job

I have a very simple one liner update_pot.sh find . -iname "*.php" | xargs xgettext -olocale/messages.pot --from-code=UTF-8 -j it works file if run ./update_pot.sh from prompt. but when i call ...
0
votes
2answers
180 views

Shell bad interpreter problem

I moved my system from ubuntu 9 to debian 5 and the cron each time that try to execute a script throws... -bash: ./somescript.sh: /bin/sh^M: bad interpreter: No such file or directory all my ...
0
votes
2answers
71 views

Privileged command as part of cronjob

I'm facing a weired problem on a unix-based machine. Here is the story: I have a personal username/password on a unix machine with limited privileges. Whenever I need to execute some commands I have ...
3
votes
5answers
4k views

How to use my aliases in my crontab?

I have some commands in my .profile that I want to invoke from my crontab. For example, if I have, alias notify-me="~/bin/notify.pl -u user1" alias notify-team="~/bin/notify.pl -u user1 user2 ...
4
votes
2answers
2k views

crontab - run immediately?

I have a bunch of cron jobs which run every 30mins. I'm currently doing some testing, and instead of setting the cron jobs to run every minute, is there a command which I can execute that'll run the ...
0
votes
3answers
790 views

Crontab repeats every 15 min

My cronjob is being repeated every 15 minutes and I don't have any idea why. Here is the crontab file with real commands replaced: # m h dom mon dow command # Comment 0 9 * * * command arg1 0 14 ...
1
vote
3answers
947 views

Change the shell for cron job

I have a zsh script that I would like to run via anacron every week. It runs fine from an interactive bash shell, but when run by anacron, I am getting command not found errors and it looks like it ...
1
vote
5answers
3k views

Cron shell script to restart Tomcat

I am having some issues with a Tomcat application server. Before I can get to fixing the problem with the Java application, I need to come up with a cron shell script to restart the server. I ...
1
vote
2answers
203 views

Best FTP Transfer Script

I am looking for a robust FTP transfer script that I can use with cron, any recommendations? I would love a script in Python that could run in the background.