0
votes
1answer
20 views

Crontab backup not working (not generating log)

I want to run a script every day at a certain hour, so I saw that I could use cron for that. Following the tutorial, I edited the crontab file like this: crontab -e and added: 26 13 * * * ...
1
vote
1answer
45 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 ...
1
vote
2answers
97 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
2answers
43 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
0answers
93 views

Cronjob for MySQL Backup Bash Script Not Running

I am trying to backup many MySQL Databases on a daily basis into a Single ZIP. The bash script works fine by itself (ran in normal environment), but when the Cronjob takes over it does not run. Infact ...
1
vote
1answer
1k views

Open firefox from bash file “Error: no display specified”

I need to open a browser and access my server with the ip address 1.2.3.4. First I ping my server and if the ping did not fail I launch the home page in a browser. For this I have written a bash file ...
0
votes
1answer
46 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
161 views

crontab doesnt upload file via ftp script

I Write script that make a zip file with /var/www Directory And mysqldump db And upload it via ftp And change mode to executable file And put It in cron tab but file doesn't upload !!! #!/bin/bash ...
0
votes
1answer
35 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
184 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
658 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 > ...
2
votes
0answers
44 views

Can I set up a cron job on Ubuntu Phone

This is the first question I have asked on askubuntu. I've been looking around, and can't find if Ubuntu Touch can run cron. So my question is: Can it? Also does it have a standard set of bash ...
1
vote
2answers
280 views

Script won't run properly in crontab, no path or permission problems

I use the geany text editor, which has a command line option to list all open documents. The following command works fine when run from the command line: /usr/bin/geany --list-documents > ...
0
votes
0answers
431 views

crontab -e unable to save

I am trying to save a cronjob to the crontab file. If i just run: crontab -e, it opens up the file in sublime but when i try to save, it pops up with: Unable to save /tmp/crontab.FKjsLq/crontab If ...
1
vote
1answer
100 views

Cronjob Bash not exporting

I have written the following script to run for when users have last logged in. I am trying to export a cronjob to a .out file. For some reason, I cannot get it to export. #!/bin/bash for User in ...
2
votes
2answers
110 views

use Cron to mail log from a job

I have a weekly script that cron runs to make a zfs snapshot. I was wondering if it is possible to mail a OK mail if the job run correctly and a error mail if something happened and in the content of ...
0
votes
1answer
390 views

Check if torrent file is complete before copying

I have a crontab command that daily copies .iso files found within my torrents folder into an iso directory on a separate partition. My problem is that multiple .iso files will still be in the process ...
1
vote
2answers
269 views

Can't find where scheduled task is set

I have a production server running a scheduled task that I simply can't track down. It seems that it is running dbdump.bash on a daily basis, but none of the cron files have a reference to that or ...
0
votes
1answer
1k views

when I run a bash file manually, it works, but crontab can not run it?

This is my sh-file: http://paste.ubuntu.com/5816543/, that I use this to download youtube files in a specific period per day. when I drag the file (y.sh) into the terminal and press return key, it ...
1
vote
1answer
178 views

Cron job bash script to restart desktop sharing?

I'm having trouble with desktop sharing crashing while during remote sessions. Is there a way to set cron to check and restart, if necessary, the desktop sharing application with a bash script?
0
votes
4answers
77 views

Minutely cron job is not running

I added the line */1 * * * * /home/zach/test.sh to my crontab, where the contents of /home/zach/test.sh are as follows: touch /home/zach/test.txt Yet, no file test.txt is being created in that ...
4
votes
2answers
623 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: - ...
1
vote
2answers
3k views

executing a shell every minute using cron

i want to run this bash code every minute using cron. I saved it onto /root/activate.sh #!/bin/bash for file in /home/user/torrents/*.torrent do if [ "$file" != "/home/user/torrents/*.torrent" ]; ...
0
votes
1answer
149 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: #! ...
2
votes
2answers
656 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 > ...
3
votes
1answer
583 views

Rsync behavior in a cron script

I have an nfs device that creates checkpoint (backups) everyday. I want to use Rsync to copy these checkpoints to another device (Drobo connected via iSCSI). So I've run the script on a single nfs ...
2
votes
2answers
280 views

create backup from directory

I would like to create backup from directory using cron. I wrote following command: cd path && sudo zip -r "backup-$(date +"%Y-%m-%d").zip" git/ && sudo mv "backup-$(date +"%Y-%m-%d").zip" /backup/ ...
0
votes
0answers
184 views

Ubuntu for phones: fully functional shell?

Will “Ubuntu for phones” work with a fully functional, normal shell/terminal like in Ubuntu Desktop? I’m working with bash-scripts with the cron and lp commands, and I have problems with these ...
4
votes
2answers
728 views

Ubuntu 12.04 isn't working with one of my crontab commands… any ideas?

In my crontab file (sudo crontab -e) I have the following commands: */1 * * * * wget -q -O /dev/null http://help.mysite.com/inc/mail/hesk_pop3.php 0 7 * * * bash -c "/home/backup/backupscript.sh" ...
2
votes
2answers
327 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 ...
3
votes
2answers
2k views

How to make a bash script generate a new filename every time it's run?

I'd like to make a .tar file of a particular directory every day of the week. The way I'd like to do it is with a bash script making a tar file every day with crontab. I was wondering, is there a ...
1
vote
0answers
460 views

Why doesn't duply work when set as a cron job?

I have a problem with a cron job which starts but doesn't complete. Running the command manually works fine. I already read the page about cron issues and solutions here on AskUbuntu, tried the ...
1
vote
1answer
912 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 ...
7
votes
3answers
3k views

Generic solution to prevent a long cron job from running in parallel?

I am looking for a simple and generic solution that would allow you to execute any script or application in crontab and prevent it from running twice. The solution should be independent on the ...
0
votes
3answers
718 views

Crontab -e gives me error messages

I get a bunch of error messages when I run crontab -e Here are the error messages. And here is my crontab file under `/usr/bin/': # /etc/crontab: system-wide crontab # Unlike any other crontab you ...
3
votes
3answers
8k views

Daily cron job not running

A quick overview: I have a script that will daily backup my source code repository from SVN into a tarball for that day. I have tested the script and it works very well as long as I run it as sudo, ...
4
votes
3answers
2k views

cron jobs not running

I've got a couple of scripts that I've had scheduled to run in cron for a while. About a week or so ago, they stopped running as far as the (very basic) logging showed, and also I noticed that my ...
7
votes
3answers
15k views

How to execute command every 10 seconds (without cron)?

When I execute cron I get this fault cron: can't open or create /var/run/crond.pid: Permission denied So, how to do it without cron? P.S. I want to check if file in svn has changed and I have a ...
5
votes
3answers
1k views

Need help with bash checking if computer uptime is greater than 5 minutes

I have an bash script that runs on a every minute cron. It checks to see if a necessary program is running and starts it if it is not. Occasionally it will run before the user has actually autologged ...
3
votes
2answers
894 views

How to create daily job without write access to /etc?

I don't have write permissions to /etc and its sub folders, but even do I would like to have bash script that is executed every morning. How to set it up? also when i type cron in command line I get ...
0
votes
2answers
1k views

How to append text to file every morning?

I would like to append current date to text file every morning at 7am. if the computer is turned off I would like it to be executed after its turned on.
5
votes
2answers
5k views

What is my crontab -e local file path? I want to set it via BASH script

In my Ubuntu, my username is "meuser". When i do crontab -e, i can setup my rules. But instead of doing it with crontab -e, how can i do it directly to a file? Which file i cant modify?
2
votes
1answer
1k views

Trouble with bash and crontab [duplicate]

Possible Duplicate: Reasons why crontab does not work I'm migrating some scripts from an older machine to a lucid ec2 machine. I'm sourcing a file in our ~/.bashrc and setting some ...
5
votes
4answers
6k views

Setup CRON weekly backup

I want to make a backup of my /var/lib/mysql and /var/www folders and save them as tar.gz files to my mounted network file server (uslons001). Here is my bash file located in: ...
2
votes
4answers
4k views

execute script after desktop loaded?

I want to execute bash script on startup that opens several terminals in different workspaces. Script works just fine if I call it from terminal, but it doesn't work if executed from crontab using ...
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 ...
3
votes
2answers
3k views

Is there a way to suspend/sleep via bash?

I have to get nine 46" LCD monitors (running Windows) to suspend/sleep at 8pm and wake at 8am every morning. It's been a bit of a mess trying to get the commands working, including the privileges. ...
2
votes
2answers
958 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?
2
votes
3answers
459 views

Backup bash script is not gzipping its tarball

I have a bash script that runs as a cron to backup files on the server. #!/bin/bash FILE=/path/to/backup_$(date +%Y%m%d).tar tar -cf $FILE /backup/this /and/that /and/someotherfiles gzip $FILE When ...