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)

3
votes
2answers
61 views

How to programmatically find the current value of DISPLAY when DISPLAY is unset? (for use in crontab)

I have a script that runs via cron to change the desktop wallpaper. I can get it to work by exporting the DISPLAY variable. But the issue I am concerned about it that the script should work on all ...
3
votes
1answer
65 views

Cronjob under Ubuntu runs slow

I configured a cronjob (running a bash script) with crontab -e which locally copies some data from one hard drive to another (rsync) and after that compares them (diff). I executed the script ...
1
vote
0answers
128 views

Start Ampps, with root permissions, once desktop loads

Been hacking my way through getting Ampps to work on Ubuntu. Ampps will be used to use host a local Web app for my families business, and I need Ampps to start when Ubuntu starts, always. I figure I ...
0
votes
0answers
15 views

binary file in /var/spool/cron/crontabs?

I have a backup disk image of an old computer (it ran Ubuntu 12 LTS IIRC) that experienced a motherboard crash. Recently I wanted to retrieve a particular crontab command I had running on that ...
3
votes
1answer
148 views

Background not changing using gsettings from cron

I'm trying to change my wallpaper to a random image using Indrajith Indraprastham's suggested script here: How to change desktop background from command line in Unity? When I run the script from a ...
0
votes
1answer
17 views

What Permissions Are Used For Scripts On Startup?

If I create a rc.local job to execute a script @reboot. I am wondering at what point in the startup the script is executed, and what permission level the the job executes my script at? I have a ...
2
votes
2answers
28 views

How many times will a cron job run when given asterisk (*) on all positions?

If we define a cron job with * * * * * /some/task/to/perform, how many times will the job be executed in 60 seconds?
0
votes
0answers
34 views

crontab MAILTO does not use encryption

I have a Postfix + Dovecot server running normally. Would I like to crontab send error logs to my personal email. I created a root@mydomain.com email to the crontab, emails are sent normally, but do ...
1
vote
1answer
36 views

Consecutive commands in crontab

I'm running a software which needs specific rights for different subfolders. Therefore I'm using crontab to update those rights permanently. On one server I'm using a perl-script which groups all the ...
1
vote
1answer
26 views

MMV doesn't execute in bash script (only if run by CRON)

this is my script "backup.sh": #!/bin/bash date=$(date +"%m-%d-%Y_%r") mmv -r "uploads/temp/*" "#1\ '$date'" mv /ftphome/uploads/temp/* /ftphome/uploads/arch/ My dir structure is like that: dr-...
3
votes
0answers
113 views

dconf-WARNING **: failed to commit changes to dconf: The given address is empty

So I got this script change_wallpaper, based from the answer from this: Automatically change Ubuntu wallpaper at a certain hour and ran it through cron. # For changing wallpaper at a certain time */1 ...
0
votes
0answers
91 views

copy table from one database server to another server in mysql

I am working on cronjob to transfer data from one server to another and after transfer is completed the first server database table should be empty for that I am using following commands but that ...
0
votes
0answers
29 views

Zombie being made from 'tail -f' cron job that grep's and launches shell script

I realize that a single zombie process like this is nothing to worry about, I just want a more professional outcome (no zombie) from my code. My cron job calling a shell script produces a single ...
0
votes
0answers
44 views

git-dude script won't work as a cron job

So I have been using this witty Git desktop notifier called git-dude, except that I had the idea of daemonizing it, so I tried invoking it through cron in an allotted time frame, which is every 5 ...
1
vote
1answer
56 views

Command to ON/OFF cron job

Is there any command that can switch ON/OFF cron job in Ubuntu? As far I know to open crontab -e and comment out each cron job. Is there any single command to stop all cron job and restart later? ...
0
votes
1answer
52 views

Anacron starts but does not run cron.daily

$ grep anacron /var/log/syslog Feb 20 19:05:11 jesus-Custom-PC anacron[1410]: Anacron 2.3 started on 2016-02-20 Feb 20 19:05:11 jesus-Custom-PC anacron[1410]: Normal exit (0 jobs run) Feb 20 19:05:13 ...
1
vote
1answer
83 views

Cron job every day at Specific Minute of Specific Hour

I am trying to set a cron job in the crontab which would execute my command every day at specific minute of specific hour. I am using the Indian timezone in my server. If I set the job like below, ...
3
votes
2answers
954 views

Running command at startup on crontab

I wanted to run a command on our linux after its done rebooting, I saw that it can be done using crontab. I wanted to run this command sudo ifdown eth0 && sudo ifup -v eth0 on the crontab ...
1
vote
1answer
25 views

Everyday Ubuntu system reboots at fixed time

I am using Ubuntu system setup by someone else. It used to restart everyday around 8 am. I checked for cron jobs, but I didn't find any. Can anyone help, why I am getting such behavior ?
1
vote
1answer
11 views

Reversing cron job mail activity

Hiii I want to check the reason behind failure of cron job mail activity without accessing server's maillog ? Is there any other way to check 'why mail wasn't send ?
1
vote
1answer
99 views

Database Data transfer from one server to another server in linux

Hi this is Ravindra and i have one question that i want to copy table data from one database server to another pc database server periodically after 7 or 10 days automatically in linux through cron ...
0
votes
1answer
45 views

Crontab script not running

I have script that will run just fine from the command line by simply using “sudo pdfBackup” however when I added it to sudo crontab –e, it’s not running. The script is in my /bin/ directory called “...
1
vote
1answer
80 views

sh script works manually but not via cron

I have a cronjob created using this tutorial: http://www.matt-helps.com/automatic-backup-of-mysql-database-to-s3/ It works when i run this command sudo sh s3BucketBackupScript.sh But I can't get it ...
1
vote
0answers
66 views

How can I run a custom script on /usr/bin/ via cronjob?

First of all: This is not a duplicated of Cronjobs made via cronjob not working which seems to be fixed by simply giving execution permissions to the script and/or adding the #!/bin/bash at the ...
3
votes
1answer
162 views

How to autorun a ruby script in Ubuntu?

How hard can it possibly be to run a ruby script on startup?! Fairly tough apparently: I'm using rvm and running ruby 2.3.0. which ruby returns /home/ubuntu/.rvm/rubies/ruby-2.3.0/bin/ruby The ...
3
votes
1answer
26 views

How to make lockout screen script for ubuntu

how to make lockout script for Ubuntu. basically I want to create script and schedule it (cron) and I want computer to lock screen everyday in: 13:00 14:00 16:40 any help would be nice. thanks.
0
votes
1answer
142 views

Logout XFCE via Cron fails with “Could not get owner of name”

I am currently trying to make Xubuntu logout when the user is idle for 2 mins. However this doesn't work. I use the command xfce4-session-logout --logout which works perfectly from the command line, ...
0
votes
1answer
40 views

Unable to start a cron task as root

I use a program to check raid status. The command is megaclisas-status. Here is the issue : Has user /usr/sbin/megaclisas-status return : This script requires Administrator privs => OK Has root /...
0
votes
0answers
30 views

How to enable suspend using cron

I am using i3 as a windows manager, and battery low detection goes by the wayside... I sometimes find my PC drained and dead after leaving it to do some work. I found a couple of good battery low ...
3
votes
1answer
54 views

How to use crontab and mutt properly?

I would like to automatically send emails via mutt. I have configured mutt and its works fine when using: echo "Hi" | mutt -s "Hu Hu" -a /home/.../some.pdf -- me@gmx.com However when using crontab ...
1
vote
0answers
90 views

Copying backups from remote server to local machine with a cronjob?

I have two remote servers, one running Apache and MySQL, and another Apache and Postgresql. Using these (https://wiki.postgresql.org/wiki/Automated_Backup_on_Linux) scripts as reference, I've created ...
1
vote
1answer
33 views

Cannot backup using Duplicity via cron

I am trying to run a backup script foo.sh via cron. The code is as follows: #!/bin/bash export PASSPHRASE=password123 duplicity ../learningbash file://../../../media/kingston unset PASSPHRASE Then ...
0
votes
1answer
37 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
168 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 ...
1
vote
1answer
117 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 ...
1
vote
1answer
17 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 /usr/...
1
vote
1answer
36 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
35 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
152 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
22 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 ...
0
votes
1answer
34 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 root/mqsql-...
1
vote
2answers
52 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
139 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) ...
0
votes
1answer
86 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 ...
0
votes
1answer
49 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
51 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 ...
0
votes
0answers
40 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 ...
3
votes
1answer
42 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 ...
1
vote
1answer
63 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 ~/bin/bigben/...
0
votes
1answer
71 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 ...