1
vote
1answer
14 views

Intermittent crontab problem

My crontab entry intermittently fails to find scripts in my user's home directory. The crontab entries run exactly on schedule as specified, and occasionally the script runs correctly, but mostly it ...
0
votes
4answers
72 views

crontab not running as root

Mysql backup scripts not running as root crontab - help I'm trying to run a crontab as root but the script is not running successfully. I can see in syslog that the script is executing but it does ...
1
vote
1answer
54 views

Script not running in crontab, file not found

I need your help to run a bash script in crontab. As many other posts in askubuntu I'm facing the problem that a script that is properly running in terminal mode does not run in crontab. The error I ...
0
votes
1answer
180 views

Cannot run cron job for a php script

I want to run a php script using cron job on localhost my script is situated at - /opt/lampp/htdocs/rrugd/myscript.php now as opt is under root, i tried adding the cron job for root as well as ...
1
vote
2answers
119 views

Create a Screen session with a bash script using contab

I want a .jar file to run every time the server boots up (we're using a VPS), and so I've edited crontab using crontab -e and then adding @reboot bash /home/bash/startserver.sh. But I haven't even ...
0
votes
1answer
40 views

Crontab wont run a script

I've set a script to run every 10 minutes using cron, but it does not run. It works when I run it manually. bin path is /usr/bin/. The script contains: #!/bin/bash scrot 'screenshot.png' -e 'mv $f ...
0
votes
2answers
45 views

Start-up / Reboot scripts for different users

I'm still trying to learn a little more about bash scripting and start-up / reboot, I have read about crontab @reboot and also just looking at other options but I just wondered if someone could maybe ...
0
votes
1answer
58 views

Why the cron job did not fire on ubuntu 12.04?

Here is the script sqlite_backup.sh under $HOME/: #! /bin/bash now=$(date +%d) echo "Welcome to Sqlite backup script" sqlite3 /var/www/db/nbhydb.sqlite3 << EOF .timeout 20000 .backup ...
0
votes
1answer
47 views

A shell file containing count but not showing when I try to run from crontab

I am new in writing shell script i write a script like this #!/bin/bash PID=$(ps -ef | grep "sh gps.sh" | grep -v grep | awk '{print $2}') if [ -z $PID ] then cd /opt/etrans/cronjobs ...
0
votes
0answers
22 views

How to autorun bash script in terminal as root? [duplicate]

I'm trying to make this script to autorun at startup, it needs root priviges, but I'm trying to run it without typing in my password. I have tried to add it with crontab, but nothing seems to happen. ...
2
votes
2answers
343 views

Setting cron to run a shell script: random wallpaper from a webpage

I have written a shell script which downloads random wallpaper from a web-page and sets it as a background every 5 hours. Here is the script: #!/bin/bash countervar=1; finish=0; cd ...
0
votes
1answer
37 views

Crontab script entry not working

beginner here. I have a script called updateTf2.sh It's contents #!/bin/bash /etc/init.d/srcds stop ./steamcmd/sh +login anonymous +force_install_dir ./tf2 +app_update 232250 +quit ...
0
votes
1answer
36 views

Cron Script Length

I have a backup script, a script that cyncs file with other files on my computer, and a script that uploads files to my website with ncftp. I used cron to load .sh files, and my shorter scripts work, ...
0
votes
2answers
229 views

how do I use upstart, instead of cron, to start a single instance of a job which should always respawn?

How do I script the following bitcoin/dogecoin/etc cpuminer command: /home/digger/cpuminer/minerd -o stratum+tcp://doge.pool.webxass.de:3333 -O <user>.<worker>:<worker_password> ...
0
votes
2answers
189 views

cron error: bad username

I've basically re-written the terminal output instead of appending a series of edits to this question: root@doge:/etc/cron.d# root@doge:/etc/cron.d# tail /var/log/syslog Dec 21 11:35:01 doge ...
0
votes
2answers
693 views

How to add the logs to a crontab with time stamp

In crontab, I scheduled a daily backup script. Now when the cron executes the script the status are logged to a log file as shown below. 0 0 * * * /home/backup.sh > ...
0
votes
0answers
183 views

Running a script with cron

When a script is run manually, it works with no errors. The script is to add a user. However when run in cron, I get emails saying: sudo: no tty present and no askpass program specified Sorry, try ...
0
votes
1answer
96 views

Running a script everyday using a cronjob

I need the exact code that I would use because I'm not able to figure it out. I use crontab -e to set up a cron job but when I save it, it never works. I'm also just trying to run a file called ...
0
votes
1answer
66 views

How to execute a script with Cron

I would like to schedule a simple script to execute when the machine reboots. I have other schedule other commands in crontab using @reboot without any problems, but I can't seem to get my script to ...
3
votes
1answer
543 views

How to create a script to check for internet connection?

I'm new to programming in linux. I started bitcoin mining using linux mint xfce 15. I'm really good following directions, just don't know how to start. I need to create a script that can run every 15 ...
1
vote
0answers
67 views

Why won't cron run my sh script?

Used gnome-schedule to create a script to set my headset as the fallback audio device because it keeps unsetting it when the headset gets disconnected or pc goes into sleep mode. Anyway, crontab is ...
0
votes
1answer
26 views

A bit of help with cron script please

I would like to set a cron on an ubuntu server to download a file to a specific location. How would I go about this? For example once a day I would like my ubuntu server to look for a file on a ...
1
vote
1answer
189 views

Cronjobs made via cronjob not working

I have the following in my cronjob -e: 00 17 * * 1-5 /home/jhvisser/bin/drive-at-five-record 00 18 * * 1-5 pkill rtmpdump 50 15 * * 1-5 /home/jhvisser/bin/z1035-no-commercial 55 16 * * 1-5 pkill ...
0
votes
0answers
436 views

Make the daily log rotate run on exact time

I have Ubuntu 12.04.2 LTS server. My daily log rotations which are listed under /etc/logrotate.d/ are executed at the morning around 7:00 am, but it is not on exact time, each day it changed on range ...
0
votes
4answers
686 views

php script not executed by crontab

I have setup a cron to execute one of my php scripts. But the problem is the php script is not being executed at all not even partially. Here is the cron I have set up 45 23 * * * /usr/bin/php -q ...
0
votes
0answers
58 views

Script is not getting executed when running from crontab

I have a simple shell script that calls a pearl script and redirects its output to a text file. When I run this from shell it exceutes, but when I do this from crontab, it does not. #!bin/sh ...
1
vote
2answers
312 views

Cron job isn't working

I have an sh file called m.sh with the contents: echo "Cleaning memory" sync; echo 3 > /proc/sys/vm/drop_caches echo "" free -m echo "" ps cax | grep java > /dev/null if [ $? -eq 0 ]; then ...
0
votes
0answers
50 views

xgamma run on cron

I am trying to set a cron job to run every minute. I have a script in a directory in my home directory. Inside the script is: #!/bin/bash /usr/bin/xgamma -gamma 2.0 I actually prefer 0.65, but I'm ...
4
votes
2answers
628 views

A script to monitor new files in folder so I can add them to an external XML files

I want to monitor (by cron, I got that part covered :P) new audio files in folders so I can add them toa separate XML files which act as an podcast RSS feed. The file structure looks like this: - ...
0
votes
1answer
153 views

Can't seem to get script/cron job to work?

ive written a ffmpeg script to mass convert mkv into mp4. when i run the script as my user, and enter my password for sudo privileges it works very well from the command line. the script is: #! ...
1
vote
1answer
199 views

remove completed downoads from rutorrent

I just setup rutorrent after being a long time rtorrent user. I want to remove the completed downloads. When I use a .torrent file i just have .rtorrnt.rc remove the file and rtorrent removes it from ...
2
votes
2answers
673 views

Crontab not running a script

I have set my crontab to run 2 script: $ crontab -l 0 20 * * * /usr/bin/bkp.sh --silent > /home/perforce/logs/bkp.log 2>&1 0 21 * * * /usr/bin/flsbk.sh --silent > ...
2
votes
1answer
138 views

Script that opens webpage and records it as cron job

I need and have to create a script that takes webpage address and time in seconds as arguments. It records whatever is shown on the webpage - i.e. JavaScript and HTML content (Flash not required). ...
2
votes
1answer
183 views

How can I create popup windows?

I have a small script run by cronjobs to synchronize a git repository every 2 hours. The git will be pushed to the server with a constant message. How can I have a popup windows which ask the message ...
0
votes
1answer
3k views

Crontab and Shell Script not Executing [duplicate]

Anybody any suggestions on why my crontab and shell script is not running. I have chmod +x my shell script and added the following into crontab -e */5 * * * * bash cd /home/jclark/scrips/ipcheck/ ...
1
vote
2answers
2k views

Auto shutdown server if there was no activity

My server should shutdown after 01:00 am, if there was no activity in the past hour. Lets say there was the last connection at 00:43 then it should check again at 01:43. How to write such a ...
1
vote
4answers
836 views

How do I get this script to run periodically via cron?

I made a script that sends my local sensors temperature to a server in the internet and then I can see a graph of it. Everything works fine when I execute it manully. I have the latest ubuntu version. ...
3
votes
1answer
939 views

How to start a never ending script at startup

I'm trying to automatically run a never ending script (so it doesn't return 0 on exit) at startup on my headless ubuntu 12.04 server with no GUI. I have tried @reboot nohup /home/luke/netup.sh & ...
2
votes
2answers
331 views

rename files inside a folder in real time

Is there a way to rename files inside a folder as they're created? I could run a cron job every few seconds to do something like... find . -name "file.*" -exec sh -c 'echo mv "$1" "$(echo "$1" | sed ...
6
votes
3answers
21k views

How can I tell if my hourly cron job has run?

I have created a file called ntpdate in /etc/cron.hourly #!/bin/sh /usr/sbin/ntpdate-debian date > /tmp/william_tmp date > /william_tmp date > ~/william_tmp echo test I also did Chmod 755 ...
1
vote
1answer
924 views

How can I prevent two shell scripts running at the same time?

I have a tar backup script that runs once a month. It runs at night through cron. I also have a power schedule that reboots the server at 4.15 every night. The problem is that the server reboots ...
3
votes
4answers
998 views

Cron not able to succesfully change background

I'm running 12.04 with a custom XML background (modification on Day of Ubuntu) that changes based on time of day. I've noticed that there's a significant delay between when the changes are scheduled ...
0
votes
1answer
165 views

“aptitude update” as cronjob, customize the cron-mail-output

I have set up aptitude update as cronjob for root and sending the mail to my normal user account. What I want to have now, is that all the output of aptitude is ommited and instead only a ...
1
vote
3answers
742 views

mplayer can't play audio from cron while ncmpcpp is playing simultaneously

I have set up a script, which executes an mplayer command, in order to play audio in crontab. It will be executed in a special set time, but this script can not play audio when ncmpcpp (a front-end ...
8
votes
1answer
6k views

Add lines to cron from script

Is there a way to add lines to a user's cron via script? I usually do it using crontab -e, but I would like to automate this task with a shell script.
1
vote
3answers
4k views

SFTP upload script, there is no key

I need to upload a file to a server. The server uploads using SFTP. After authentication, any command execution is forbidden, so I cannot SSH directly in, I need to get directly into the SFTP ...
13
votes
2answers
17k views

At what time does cron execute daily scripts?

If I place a shell script in /etc/cron.daily/, at what time of the day will it be executed?
2
votes
2answers
3k views

Problem with crontab, script runs when executed from command

this is my cron entry: */5 * * * * /home/user/scripts/backupDB.sh && echo "Backup Successful: $(date)" >> /home/user/tmp/mybackup.log This is the script that is called: #!/bin/sh ...
2
votes
2answers
981 views

Function of /etc/cron.hourly

If I create a script and then place it in this folder (/etc/cron.hourly), will my system run this script hourly? Or does my script need to begin with a command as well?
11
votes
6answers
40k views

How to run scripts every 5 seconds using cron?

I would like to know how to run a script every 5 second. I know that cron can do every minute. How do you get intervals below that?