0
votes
1answer
147 views

Why does this bash script give an error on Ubuntu but not OSX

#!/usr/bin/env sh export $NODE_CONFIG_DIR=/Users/full/path/to/script/config cd /Users/full/path/to/script /usr/local/bin/node main The script runs locally on OSX (if I adjust the paths for the local ...
0
votes
1answer
133 views

Cron unable to run shell script

I have been trying to get a shell script to run for hours using cron to no avail. I am trying to have the following bash script run every minute #!/bin/bash ...
2
votes
2answers
472 views

Working with git via crontab

I have the following shell script #!/bin/bash REPODIR=$HOME/work/repository/ cd $REPODIR var=`git fetch --dry-run 2>&1` echo $var > $HOME/error.txt I want to run my script every minute, ...
0
votes
1answer
40 views

two crons not running simultaniously? [duplicate]

MAILTO="" */10 * * * * /bin/bash /var/www/sym_monitor/sym_start.sh > /var/www/migrate/root_start.txt 2>&1 */10 * * * * /bin/bash /var/www/sym_monitor/stop.sh > ...
0
votes
0answers
12 views

shell script not running the other script inside it [duplicate]

#!/bin/bash value=$(</var/www/sym_monitor/man.txt) if [ "$value" == "true" ]; then ps -ef|grep sym |grep -v grep |awk '{ print $2 }'|sudo xargs kill -9; cd /var/www/symmetric-ds-3.1.6/bin; ...
0
votes
2answers
730 views

Execute a root command every 24 hours after startup

I want to execute a command as root on an Ubuntu 11.04 machine every 24 hours. This machine is not on all of the time, but when it is, it can be left on for days at a time. How should I correctly ...
2
votes
5answers
792 views

rsync works fine until I put it in crontab (UPDATE: 'date' doesn't work in crontab)

I've got this rsync command that works just fine when I run it from the command line (Ubuntu Server 12.04.1 LTS). I'd like it to run every hour, on the hour, and output the results (along with errors) ...
0
votes
2answers
1k views

Issue pushing file from linux to windows with smbclient

I have a file located on my linux box that is generated by a python script, the file is dropped inside of the /root/ directory My bash script looks like so: #!/bin/bash # Run the HR Data feed cd ...
1
vote
0answers
830 views

Why does cron task run twice?

I have a task that should run each day in Ubuntu10.04. So I use crontab and copy the scripts of the task to the directory /etc/cron.daily. Here is the my crontab: # /etc/crontab: system-wide crontab ...
1
vote
0answers
260 views

What happens if cron.daily is not terminating

Today I had to realize that some cron jobs werent run on my server! In the log files I find this: Mar 13 03:30:01 osp-server anacron[7261]: Anacron 2.3 started on 2012-03-13 Mar 13 03:30:01 ...
0
votes
0answers
144 views

Crontab crash when running a script that insert a lot of lines in MySQL

My crontab is crashing when I run a script that insert alot of lines on MySQL Database, but when I run a script that inser few lines it run properly, is there some configuration file of cron? Maybe ...
1
vote
0answers
217 views

Why isn't crontab working for me? (Ubuntu 11.04)

I can't get the crontab jobs running. I've checked /var/log/syslog and the scheduled jobs aren't there. I've edited the jobs with sudo crontab -e so they are created for root. This is how my jobs ...
2
votes
2answers
2k views

How to execute a php file with crontab?

I have ubuntu setup with lamp and I was wondering what I would type to start a php page say at 2am everyday. I am still studying how crontab works so I can't test to see which one works. So if I ...
0
votes
0answers
1k views

Running a bash script at random times using cron job

I need to monitor intrusion on a server at (relatively) random intervals. For that I have set up a cron job to run every hour. I have written three scripts: wrapper script that calls a ...
3
votes
4answers
2k views

Is it possible to use variables in crontab -e?

Can I say: MYPATH=/root/scripts MYSCRIPT=doit.sh 0 1 * * * $MYPATH/$MYSCRIPT in crontab -e ? Is it possible to use variables in crontab -e ?
4
votes
2answers
1k views

Can Ubuntu play a video via cron job?

I'm developing a display system for a paint shop. I've set up a computer with Ubuntu to run the video and display it on a TV, running a PHP script that should update the video every hour via the ...
2
votes
3answers
8k views

Crontab not working in Ubuntu 10.04

I installed it in a machine at work and it wouldn't do anything, no matter what I did. So now I have it on virtualbox at home and it also doesn't work. Here's what I'm trying to do: Have a file on ...