Cron is used to execute scheduled commands. It acts as a task scheduler on Linux and UNIX systems which will execute commands at specified times set by the user. Cron has a great deal of customization and is often used on server environments where common tasks are run on a regular basis.

learn more… | top users | synonyms (2)

0
votes
0answers
2 views

How to check network usage over past X minutes

I have a media PC (that is also a web test server on the LAN) that I want to reboot every so often as long as it is not in use. I have tests in place for the server using kodi, myth etc (its the ...
0
votes
0answers
8 views

PHP session files are created very fast and are not deleted automatically

Platform: Linux Ubuntu 14.04 Main problems: PHP session files within /var/lib/php5 are never deleted New session files are constantly being created at a rapid speed The garbage collection is ...
0
votes
1answer
14 views

Removing Prior Crontabs

I think I have competing cronjobs. When I run "sudo service cron status" I get the following output: Main PID: 31130 (cron) CGroup: /system.slice/cron.service |-11690 ...
0
votes
1answer
24 views

Crontab to stop and restart a server

I have a node.js server running in my linux VPS. Currently I go to the server's directory and type node server.js. After 1 hour I must stop it and restart. So what I'm doing is resume the server ...
2
votes
1answer
184 views

Crontab on Ubuntu Phone - Scheduling synchronisations

On my Aquaris E4.5 I have successfully configured syncevolution to synchronise my CardDav Contacts and CalDav Calender entries. Now I would like to schedule synchronisations. However, since ...
12
votes
8answers
6k views

Notify-send doesn't work from crontab

I made a script that should notify me when there's a new chapter of manga that I'm reading. I used the command notify-send to do this. The program works when I am trying to run it in terminal. The ...
30
votes
7answers
31k views

Changing default crontab editor

I am trying to change the default editor from nano to vim. I have run the following commands: sudo update-alternatives --config editor and update-alternatives --config editor Both now output: ...
0
votes
1answer
20 views

Crontab isn't working with simple bash script

I am not quite sure what I am doing wrong. I am trying to create a cron job to run a bash script. The bash script will basically check my file (ip.address.txt), find my public ip address, then check ...
0
votes
0answers
28 views

variable exported in sourced file not available

I have a script that contains the following: #!/bin/bash source $HOME/.bashrc echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" This script is run on @reboot by cron, with output redirected to a log file. ...
1
vote
2answers
29 views

Running a Perl script as cronjob is not working while manual starting does the job

I have 3 cronjob entries (crontab -l) the first entry is a Perl script what creates a LVM backup of a virtual machine and the other two are just sh files performing mysqldump. Well however, I edited ...
0
votes
0answers
14 views

NFS Share Mount Issue

I have my main PC, and a server PC on my network. I don't always power on my server and this is causing an issue with my NFS share/mount. If I start my main PC and use it for a bit and then I decide ...
4
votes
3answers
5k views

TIme of execution of daily anacron job

I have set a daily anacron job, which runs form /etc/cron.daily. From the /etc/crontab I see it should run daily at 06:25 (or at start-up/reboot). However when the date changes (00:00) and the ...
0
votes
1answer
21 views

FTP Users Authentication error: 530 and File Formatting

I have a script I am trying to run as a cron job. When typing the script in via a terminal there is no problem tho I am replacing the variables with the actual value. #!/bin/bash cd ...
1
vote
2answers
30 views

How to restart process running on Ubuntu 14.x version

I am new with Ubuntu. Please help me for this mentioned issue. This shaded area in attached image is my process that is running on Ubuntu 14.x version. It is python program which is reading a ...
3
votes
1answer
36 views

Destroy ssh tunnel if exists and create new one

I open a reverse ssh tunnel after the OS reboot (on office pc to a dedicated server). I put it into cron by @reboot /myssh.sh. The ssh opens a port on server. My problem is : If the OS (office pc) ...
1
vote
2answers
7k views

Cannot run bash script from crontab when it works from command line bash

I have a strange problem of being to able to run a bash script from commandline but not from the crontab entry for root. I am running Ubuntu 12.04. * * * * 1-5 root ...
1
vote
1answer
23 views

Cron job starts the python script, but no output is received

I have a python program that copies contents of USB devices connected to my pc, in this case it's an Android tablet. The script usese pyudev to detect the devices and then use GVfs to mount them. I ...
-2
votes
0answers
17 views

Delete files in a cronjob every day [duplicate]

How do I setup a cronjob to delete the following files every day? Which commands should I use? /var/log/extension_status.log /var/log/update_daemon.log /var/log/keepalive.log ...
0
votes
1answer
19 views

tmpreaper Cannot chdir() to `/tmp/

My friend and me run a website hosted on an Ubuntu VDS. None of us is sys-admin. The site use an ImageMagick tool for PDF to PNG conversions. This fills the /tmp/ folder with tons of big temporary ...
0
votes
1answer
20 views

crontab java process information

I try to get a bash script running that should output the java process information to a file. Unfortunately when I add it to the crontab -e the script is not executed. As user root the script is ...
-1
votes
0answers
45 views

Copy multiple folder and overwrite

i have two folders: /test1/film1/filmnew.mkv /test1/film2 /test1/film3 /test2/film1/filmold.mkv /test2/film4 /test2/film5 Now i want to copy all folders from test1 to test2. If the folder not ...
3
votes
1answer
23 views

Scheduling power off and on of my headless server

I want to schedule power off at 23:30 and power on at 6:30 everyday. Here are some problems: If I run such command sudo rtcwake -m off -l -t $(date +%s -d 'tomorrow 06:30') it switches off the pc ...
0
votes
0answers
18 views

Need some advice with a script for anacron

I made a bash script and I made it by using gedit as sudo. Let's call it "script.sh". Then I made the script executable. I've already tested it. It does run, but with sudo. Inside the script I didn't ...
15
votes
4answers
48k 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
votes
0answers
18 views

why cron is running my script in parallel mode

I am trying to run a script using cron. when I run it in normal way (./myscript) it is doing it in the right way. When I run it with cron (./myscript | at now) the instruction are not executed in ...
3
votes
1answer
2k views

Why did /usr/lib/php5/sessionclean run 50 times simultaneously on my 14.04 system?

When I sat down at my Ubuntu 14.04 system this morning, the root cron job /usr/lib/php5/sessionclean was running over 50 times at once, producing 50+ copies of the following commands: root 8147 ...
3
votes
4answers
17k views

How to remove or delete single cron job using linux command?

I have created cron jobs for my site which is listed below and they are working fine. I print all cron job by using this PHP script: $cronfiles=exec('crontab -l',$output); echo "<pre>"; ...
1
vote
1answer
40 views

Help using crontab to play a sound

I want to use crontab to play recordings of the big Ben every hour and at 15,30 and 45 minutes. So far I'm using mplayer2 and the following tasks: 0 1,13 * * * mplayer -really-quiet ...
0
votes
1answer
18 views

Not sure how to change a line - Crontab script for Spamassassin update fails with the error: unexpected operator

A real newbie question. Not an experienced user at all, so please walk me through this I have a cron daemon error and have been told to +++ Symptoms Parallels Plesk Panel sends mail with the ...
4
votes
2answers
8k views

Cron scheduling: Is the hour argument in 24h format?

In order to run cron in the night at 4 o'clock I need to write 4 * * * *? And to run at 16.00 o'clock, it should be 16 * * * *? thanks
3
votes
3answers
13k views

Getting output from a cron job on the terminal

I have a program that prints some output that I would like to pop up on my terminal once every hour during the workday. $ crontab -l 0 07-17 * * * /home/dat/scripts/cron.out syslog reports the ...
243
votes
38answers
369k views

Reasons why crontab does not work

Often, crontab scripts are not executed on schedule or as expected. There are numerous reasons for that: wrong crontab notation permissions problem environment variables This community wiki aims ...
1
vote
1answer
216 views

Docker is managed via upstart, try using service docker

I'm using following system: root@alexus:~# cat /etc/issue.net Ubuntu 14.04.3 LTS root@alexus:~# uname -a Linux alexus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 x86_64 ...
4
votes
3answers
4k views

How to call zenity from cron script?

Example script error.sh: #! /bin/bash zenity --error --text='Something very bad has happened!' My incron-config: ~/Documents IN_MOVED_TO ~/scripts/error.sh If I run error.sh in terminal GUI ...
3
votes
1answer
41 views

stop/delete cron jobs of users who doesn't exist anymore

How to stop (Delete) the cron jobs of those users who are no longer a part of the Ubuntu server?
3
votes
1answer
58 views

Help, ubuntu server 14.04 crontab cannot run my database backup script, but other simple script is ok

Hi All Ubuntu Server Experts I need help in cracking this crontab problem. So, I made a change in /etc/crontab to run a system script for database backup purpose. The crontab does not seems to run my ...
23
votes
6answers
56k views

How do you set the timezone for crontab?

I have set up ACPI wakeup so my laptop wakes up at a certain time each morning. The timezone for this is UTC. I want to set up my crontabs also using UTC so they fit with the wakeup alarm. How do ...
0
votes
0answers
11 views

Timezone CRON issue

I wanted a CRON job on my server to run at 5 AM GMT every day, so that according to my timezone (IST), it'd send an email at 10:30 AM. Here's my date and timezone settings: ~# date Fri Jan 1 ...
0
votes
2answers
25 views

cron.hourly sendmail errors even though my scripts do not involve sending mail [duplicate]

I have only one very simple shell script in /etc/hourly.cron. It just controls a Twitter bot- it runs a short python script that posts to Twitter using tweepy. It does not involve email or any ...
0
votes
1answer
47 views

Cronjob permission denied (Nightly backup shell script)

I am trying to create a shell script to make a backup every night using tar. The error I get is: From shady@wserver1 Wed Dec 30 04:01:01 2015 Return-Path: <shady@wserver1> X-Original-To: ...
0
votes
0answers
14 views

Automated backup script no longer running after upgrading to 14.04.3

I have a backup script that flawlessly backed up my system on an hourly basis, until I upgraded to Xubuntu 14.04 from Xununtu 12.04. I did not initially notice, since I just assumed it would keep ...
0
votes
1answer
404 views

How is trim enabled in Ubuntu 15.04? [duplicate]

Does it work once a week or does it continually trim the system? I have seen answers for this but they refer to Ubuntu 14.04 but not to Ubuntu 15.04
4
votes
2answers
174 views

One single cron job not running

I have a list of cron jobs. 00 21 * * * sh ~/db_backup.sh 20 21 * * * sh ~/update.sh * 5 1 * * sh ~/db_vacuum.sh The first job makes a backup of a database I have running on an Ubuntu server, ...
1
vote
0answers
34 views

crontab run sequentially

I have to run crontab in xvfb display mode forever when the system restarts...below is crontab code.... @reboot nohup Xvfb :1 -screen 0 1024x768x24 & export DISPLAY=":1" @reboot /usr/bin/forever ...
12
votes
2answers
18k 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 ...
0
votes
0answers
61 views

What is Permission denied (publickey,gssapi-keyex,gssapi-with-mic)?

#!/bin/bash/expect for host in `cat jo.txt` do ssh -i /Users/Aparna/Desktop/Key/mfiosdev_rsa root@$host "timeout 4s curl -sL -w "%{http_code}\\n" "http://$host:9080/worklightconsole/" -o /dev/null -v ...
1
vote
2answers
4k views

crontab Suddenly Stopped Working

Ok so here is my problem, I recently updated my server and change some jsp files which are used to do automatic announcements. The crontab has all the .sh files listed within it and the .sh files run ...
0
votes
1answer
125 views

Cron jobs not running while OS is locked

I have a cron job that runs a simple bash script to swap out the current wallpaper with a random image from my wallpapers folder every minute. This works fantastically for me. However, whenever I lock ...
0
votes
0answers
11 views

Remind user of a backup task, for example once a week (Bonus: on shutdown)

I am looking for a kind of cron task that remindes (on my Xubuntu desktop) me once per week to do a backup (which is a rsnapshot shell script which should be started in a terminal to see the ...
0
votes
1answer
23 views

Script for checking internet connection and password request

Good morning, I have a home server running Ubuntu 14.04.3 LTS. It's a desktop connected to my wi-fi connection via an USB adaptor. The issue here is that randomly it gets disconnected from the ...