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
8 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
7 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
8 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 ...
2
votes
0answers
24 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
17 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
16 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
15 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
24 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
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 ...
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
23 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
31 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
15 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
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
31 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
42 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) ...
-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
26 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 ...
-1
votes
0answers
46 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 ...
0
votes
1answer
21 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
21 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
19 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
24 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
votes
0answers
19 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 ...
1
vote
1answer
42 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 ...
3
votes
1answer
46 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?
2
votes
1answer
64 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 ...
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
27 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 ...
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 ...
0
votes
0answers
63 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 ...
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 ...
2
votes
1answer
38 views

cannot access crontab after changing uid

I recently changed the uid of my linux account (the reason for this change lies in the need to have a precise uid to access files on a mounted drive). Since then, I cannot access my crontab. After ...
3
votes
2answers
36 views

cron does not write in the file

I just start with cron jobs and I wanted to start with an easy task. Create a file in my home folder with the output of the ifconfig. So I created test.sh, which I made it executable with the: ...
2
votes
2answers
36 views

How can I remove a cron job set as user ubuntu

I'm using Ubuntu 14.04 and I have created a new cron job as a different user. I started gksu gnome-shedule and set up a new cron and set it up as user ubuntu. Now I can't edit or remove this job. Is ...
4
votes
2answers
175 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, ...
0
votes
2answers
34 views

CRON: Starting new cycle while the last one is still running?

Example, there is 1 .py script set with CRON to execute every 5 minutes. What if that script takes more than 5 mins to finish? Would that cause the problem? Would .py program broke? Is it possible to ...
0
votes
0answers
17 views

How to run `updatedb` without `sudo` every hour? [duplicate]

I would like to keep the database updated every hour using crontab, are there any ways that I could do this without entering password every time? Thanks!
1
vote
0answers
45 views

Evernote: script that can incrementally download full db where note = file?

Is there any script to incrementally download my Evernote database in plaintext? I need to have not one big file but many files (with attachments) - I want to use cron for everyday backup to git and ...
2
votes
1answer
35 views

Cron Job Produces No Output

I am using the following cron entry to clean my Postfix queue: * * * * * mailq|awk ' /^[0-9A-F][0-9A-F]*.*MAILER-DAEMON$/ {print $1}'|tr -d '*'| xargs -rn1 /usr/sbin/postsuper -d > output.txt ...
3
votes
1answer
43 views

Bash script not working properly from crontab

I've some scripts that run perfect if you run them from a terminal, but once you add them to crontab it's like the bash doesn't execute properly and doesn't continue with the first IF statement and ...
1
vote
1answer
87 views

Run Android Studio on reboot using shell script

I'd like to start Android Studio while my computer starting. I used crontab and @reboot parameter: crontab -e and scheduled this task @reboot /home/ziko/reboot_cron.sh # JOB_ID_1 SHELL=/bin/sh ...
1
vote
1answer
51 views

mysql cron job - Email only when restarted

I've got the following cron job and it runs every 5 minutes (it actually works) #!/bin/bash PATH=/usr/sbin:/usr/bin:/sbin:/bin if [[ "$(/usr/sbin/service mysql status)" != *start/running* ]] then ...
0
votes
1answer
32 views

Cron job shut down the system ignoring the specified time

I made a script that asks the user if he wants to shut down the computer in 10 minutes or wait another hour and I scheduled in cron to run each hour from 18h to 7 am. However it happened two problems: ...
0
votes
0answers
22 views

Cron Shutsdown MySQL every day

I'm not a sysadmin, but I run several VPS on my daily work most of all for WP sites. In one VPS (DigitalOcean) 2GB RAM / 2CPUs 40GB SSD Disk my MySQL dies after a Cron Job Runs, here are my Crontab. ...