0
votes
1answer
22 views

git push script, only if difference

I've found some nice questions illustrating how one would write a script automating git push/pull with cron here and here, but I want to elaborate on that slightly. I only want to push/pull if there ...
2
votes
2answers
168 views

Cron Job Creation

Okay, so I have had a quick look at the answers posted on this question and re-formulated my cron job. So, let me break this down as clear as I am able to: PC/OS | Shell Info I am currently running ...
0
votes
1answer
49 views

Cron job daily not running

I'm having trouble with setting a cron job to run daily when I enter the script to /etc/cron.daily when I put it there it doesn't run at all like it should be doing. I setup a script so that it can ...
1
vote
1answer
85 views

Change system volume using crontab & pactl

I am trying to change Ubuntu 14.04 system volume using crontab. I am using following command: pactl set-sink-volume 1 75% Which works fine when I use it in terminal or when I run script which ...
1
vote
3answers
93 views

Not able to run sed on bash script

I am working trough some legacy code which does not work, I came across a part that is causing problems. I was hoping some one could help me out and fill me in on what is the exact functionality of ...
1
vote
1answer
92 views

Who runs scripts inside /etc/cron.hourly if anacron is enabled?

I've read that if anacron is enabled cron doesn't run the scripts inside cron.weekly/hourly/daily/hourly, as not to run them twice. So anacron takes responsability on that folders. However anacron ...
0
votes
1answer
54 views

Tell me where is mistake in anacron task?

I have tried to make this task for abacron: dm@dm-system:~$ cat /etc/anacrontab # /etc/anacrontab: configuration file for anacron # See anacron(8) and anacrontab(5) for details. SHELL=/bin/sh ...
3
votes
2answers
2k views

Ubuntu 14.04 not running Bash scripts in /etc/cron.daily

I have a few scripts (that currently run in a CentOS system) I have moved to a new Ubuntu 14.04 system. These scripts are in the /etc/cron.daily to run once a day. These scripts are to run at the ...
1
vote
1answer
88 views

Run the script file after 5 or 10 min after restarting the system

I have created a ruby script file that checks the connection present or not. For example checking port 22 is opened or not. Firstly I tried with cron job as follows @reboot find ...
1
vote
1answer
123 views

Editing Gsettings unsuccesful when initiated from cron

I must have a blind spot, but I cannot find what it is. I made a small python script that removes VLC from the sound menu. It runs perfectly in any way I run it from the terminal or from a launcher ...
0
votes
0answers
24 views

cron to email when a psql stops recording data

I have a PSQL setup and records data every 10 minute or less. The connection sometimes dies and it results is logging failure and I have no idea when that happens. I want to create a cron job to email ...
1
vote
2answers
80 views

Running shellscript with cronjob is making problems, executing manually not. Ideas?

I made a shell script called /home/root/cron_grads.sh (chmodded 755) on my server. In this directory are more grads-scripts like 500hPa_p0.gs (644). My main script creates a temporary file ...
0
votes
2answers
30 views

Keep backing up (copying) the same file to a new folder

I am saving a stream in my HDD. I'd like to copy the file periodically into a subfolder backup such that the older versions of the the file are not deleted. Simply put Assume the original file is ...
1
vote
2answers
57 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 ...
1
vote
5answers
703 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
329 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
2k 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
2k 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
43 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
121 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
75 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
60 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
23 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
919 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
53 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
49 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
327 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
2k 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
2k 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
236 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
569 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
104 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
1k 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
110 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
30 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
221 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
1answer
768 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
2k 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 ...
1
vote
2answers
486 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 ...
4
votes
2answers
813 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
205 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
291 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
1k 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
163 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
347 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
4k 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
1k 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
1k 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 & ...
3
votes
2answers
401 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 ...