0
votes
1answer
36 views

How can I configure a second SSH key + user for a single server?

I have a SSH key which is passphrase-protected. Authentication to the server is by SSH key only, password authentication is disabled. Both the server and my desktop run Ubuntu 14.04 and authentication ...
0
votes
1answer
72 views

Cron job not running - postfix/sendmail error

Here is my content of sudo crontab -e @hourly /home/userName/ntpdate.sh The content of my script (ntpdate.sh) //.25 is my ntp server echo "Current time is $(date), " >> ...
0
votes
0answers
16 views

Doubt : locate command: reschedule to every 2 mins

Will mlocate cron scan complete file system in scheduled time? Or will it just merge databases whatever files/folders added between scheduled time? I am planning to reschedule mlocate cron job to ...
1
vote
2answers
51 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 ...
1
vote
1answer
23 views

Stopped Jobs error upon logout

There are times when I attempt to logout of SSH and I get something along the lines of: There are stopped jobs Not knowing what this is, I end up force quitting putty with the exit button in the ...
0
votes
0answers
22 views

Why is my server (12.04 LTS) catching up on a missed cronjob when woken over LAN?

... or what else is happening here? My homeserver running 12.04 LTS server is running on a wake/sleep schedule. I have a script "hibernate-starter" being run by root's crontab at specific times. The ...
5
votes
2answers
142 views

Why do I see a CRON session opening and closing every hour in /var/log/auth.log?

I am quite fresh with Linux as a whole, so this may be a silly question - but I would still like to know the answer This morning when I look at my /var/log/auth.log (which I've been told to make a ...
1
vote
1answer
161 views

Cannot get ntpdate cron to run

I'm trying to have a daily cron update the clock on my 12.04 server. I've followed the instructions here, but it still doesn't run: After a few weeks, the clock once again is off by a few seconds. ...
0
votes
1answer
596 views

Ubuntu VPS Automatic Backup Script

Can anyone tell me how to create a backup script for Ubuntu VPS which is used as a webserver. I also want to add it as a cron job so that it runs automatically every day midnight at ...
1
vote
2answers
947 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 ...
1
vote
1answer
79 views

Ubuntu Server cron job doesn't work

My script that is supposed to run only when the server is on isn't working correctly when run by cron. If I run it manually, it works. backup() { if pidof java &> /dev/null; then ...
0
votes
0answers
162 views

cron job exetue, but receive error + 500 internal server error

I created a cron job on my apache server's cPanel, every 5 minute push the script, with this command: lynx -source http://mydomain.com/...c_html/xxxx.php and that script does not execute.. i receive ...
0
votes
3answers
75 views

Cronjob for specific hours

I need a cronjob with criteria to power on/off a TV on the basis: Mon-Fri, power on the screen at 07.00 and power off the screen 17.00. Friday after 17.00 to Monday morning to be powered off. I'm ...
0
votes
2answers
410 views

Cron Job Not running after proper setup

So I created a cron job as shown below: GNU nano 2.2.6 File: /tmp/crontab.uNoEXy/crontab # Edit this file to introduce tasks to be run by cron. # # Each task to run has to be ...
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 ...
0
votes
0answers
22 views

Cron job as specific user not running [duplicate]

On my Ubuntu box I have a crontab setup for my normal user that has the following: 0 0 * * * sudo mysqldump -u root -h localhost --all-databases | gzip > /home/<user>/mysqlbackups/db_`date ...
1
vote
0answers
122 views

Can't stop LAMP graceful restart

I just got my first LAMP up and running, everything works fine except that my server is restarting itself every sunday. When I read the logs I see "Graceful restart requested, doing restart" Should ...
-1
votes
1answer
2k views

Cron job every second

How can I run a PHP script every few seconds in Ubuntu Server? (bonus: How can I run random within the cron script, e.g. every 3 seconds + random(3 seconds) )
0
votes
1answer
197 views

Starting xterm windows via cron

I am using cron on Ubuntu Server 12.04 to schedule the system to automatically reboot at midnight, and on reboot, execute a script that starts a vnc server and opens eight terminal windows and runs a ...
1
vote
2answers
432 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
5answers
7k views

Cron job to restart Apache

Ubuntu Server 12.04. I use: sudo crontab -e * * * * * root /etc/init.d/apache2 restart > /dev/null 2>&1 sudo restart cron And it doesnt work. How to fix it? So many docs in google,I need ...
2
votes
1answer
243 views

What happens to cronjobs scheduled when the server is off?

I have an Ubuntu Server 12 which isn't on all day. In the /etc/crontab, I see that cron.daily, cron.weekly and cron.monthly are scheduled at times the server is off, usually. What happens with those ...
1
vote
1answer
9k views

Daily server reboot cron?

I want to create a cron job which executes daiy at assigned time and it restart the ubuntu server. I try to add reboot only in cron, but it is not working, whereas it works when I try to execute it ...
0
votes
1answer
50 views

Execure a random command from .txt file?

I have a Ubuntu server, and I'm trying to print a Twitter quote using the app "twidge". So I made a list of tweets on a .txt file. I want to print one tweet (per line) from that file and send it to ...
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
1answer
9k views

Cron job not executing

I was making a cron job to save my Minecraft world from my ram every 5 minutes. I tested the script and it seems to be working. This is what the script looks like: #!/bin/sh ...
1
vote
1answer
1k views

Why does Ubuntu Server run both cron and atd?

From the man pages it appears both do basically the same thing, why have both running on the system at the same time? From the wording in the man pages it looks like cron will repeatedly run programs ...
7
votes
3answers
26k 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 ...
0
votes
1answer
884 views

Why isn't this simple CRON job working?

I am on Ubuntu server and would like to send an email to myself every 10 minutes (as a test). The code for that is in this file: /var/www/cron-test.php To set up the cron I typed: crontab -e ...
2
votes
3answers
1k views

What is the easiest, most effective backup system for Ubuntu Servers?

I'm trying to backup my /var/www/ folder, MySQL, and any other special documents like in the /etc/apache2/ folder. Does anyone have any solutions for backup software? Maybe something that's ...
2
votes
0answers
2k views

logcheck: (CRON) error (grandchild #4266 failed with exit status 127) [closed]

for my Ubuntu 10.04 LTS server, logcheck send me this log: Nov 14 08:10:01 servername CRON[4265]: (CRON) error (grandchild #4266 failed with exit status 127) Nov 14 08:10:01 servername CRON[4264]: ...
1
vote
2answers
303 views

How do I shutdown Oracle automatically every Friday at 10pm?

You install oracle database but need to shutdown at night every Friday at 10pm so that you can make backups. How would you achieve this automatically using the crontab utility? Assume that the script ...
1
vote
1answer
1k views

How to use cpulimit on ALL cron jobs?

Using Ubuntu Server an AWS micro box, so if the cpu utilization spikes AWS will virtually kill the CPU for the box (for about 30 sec). nice doesn't solve the problem, but cpulimit does (I use it in ...
2
votes
1answer
2k views

Why would logwatch (with cron) on stop e-mailing me daily reports?

I have logwatch configured with cron to e-mail me a daily report from my ubuntu server. Occasionally, something happens like the power goes out (which is what just happened actually) or the system ...
1
vote
1answer
329 views

How to download Ubuntu Server backups automatically?

I'm thinking of an investment in a new root server running ubuntu. Due to the fact, that the provider won't have extra backup-space, I need an other solution. Is it possible to download the server ...
1
vote
2answers
3k views

How can I setup nightly backups via the command line?

I'm running Ubuntu Server and I'm looking for an efficient way of performing nightly backups of particular directories using cron. However, since the computer isn't always on, I'd like it to just run ...
2
votes
2answers
835 views

How can I use cron to schedule a script that implements daylight saving on a non- DST aware application when my server automatically uses DST?

My server (running ubuntu 8.04LTS server) reports the time as 9:38PM BST right now. BST (British Summer Time) is 1 hour ahead of UTC (or Greenwich Mean Time if you really want to confuse matters) The ...