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
2answers
23 views

How to shutdown system if not charging

I am using Ubuntu 14.04 LTS. My battery is not working, i.e. it provides backup for around 5 minutes. Now when I download stuff, it sometimes takes around 5 - 6 hours. And I can't just hang around the ...
0
votes
0answers
9 views

Why am I seeing much more cron jobs in webmin than in `crontab -e`?

I am just starting to learn cron jobs. Basically I am going to use webmin to manage my cron jobs, I am also reading some basic information about cron jobs. So far I've learned that /etc/crontab ...
0
votes
1answer
7 views

Why I am seeing different content in crontab -e and nano /etc/crontab

I just start learning to use cron job. I've learned that cron jobs' setting and information are stored at /etc/crontab and I come across this command crontab -e, when I execute it, I was prompted to ...
0
votes
1answer
20 views

start screen programm with crontab @reboot

I try to start a start.sh at reboot with crontab. But nothing happens afer a reboot, and the log is without an error. Does someone know what i've done wrong? For testing i gave the start.sh and ...
0
votes
2answers
16 views

run two ongoing processes on startup with one that needs initialization time

I'd like to record start recording utility consumption right at startup but I can't find the right combo of operators, pipes, and sleep commands to enter into crontab -e . I think my smartest attempt ...
0
votes
2answers
28 views

crontab doesn't seem to work and makes different schedule in cron.d!

sudo crontab -e lets me edit the crontab, and I put in this: # Hourly backup 0 * * * * rsnapshot hourly # Daily backup 0 2 * * * rsnapshot daily # Weekly backup 0 4 * * 6 rsnapshot weekly And it ...
0
votes
2answers
17 views

How to start Crontab before login?

Basically I have a script (.sh) that syncs a local folder with an FTP one (using cron to run this). This script needs to be ACTIVE AT ALL TIMES (business use :D) and the only thing I cant control is ...
0
votes
1answer
26 views

Location of start-up configuration files - Firefox launching at startup, Ubuntu MATE 16.04

My problem is simple. Firefox is launching by itself at startup. I can't disable this and if I try to purge it then it tries to also uninstall MATE desktop WTF ??!! The question is which are the ...
0
votes
1answer
412 views

Why my cron job is running every minute when it is scheduled to run every hour?

I have a script that creates a cron job to take a backup of a local MongoDB. When I execute crontab -l command, I see following: * */1 * * * cd /home/user/shell-scripts && sh mongo-backup.sh ...
-1
votes
0answers
9 views

How to copy files from one location to another location using crontab

How do I copy files every five minutes from /var/log to /var/tmp , these are my requirements 1.every five minutes copy messages* files from /var/log to /var/tmp 2.create a directory everyday in ...
259
votes
5answers
392k views

How do I set up a Cron job?

I want to schedule a task to run on a regular basis and have heard that Cron is the way to do this. How do I add Cron jobs in Ubuntu?
2
votes
1answer
21 views

What is needed to automatically run Cron tasks created with Gnome Schedule?

I used Gnome Schedule to create the following test task. The task runs fine manually but is not being run every hour automatically as defined. What is required for this task to run automatically? ...
0
votes
2answers
47 views

How to do a monthly system backup

I want to create an automatic monthly backup on Ubuntu 14.04 LTS - Server Ed., with the following command: $ tar -cvpz --exclude=/bckupftp --exclude=/ser --exclude=/proc --exclude=/lost+found ...
0
votes
0answers
13 views

Cron Job Error email

I'm new and I have a Precise server which had a trojan which I cleaned however There was a cron job created by the trojan and since i removed the jobfile from location every three minutes I get this ...
-1
votes
1answer
17 views

how to find a folder based on creation time

I would like to write a small script that: finds the creation date/time of a folder on a server that creates a backup folder every two days with the date as 2016 04 22 as folder name remove the ...
1
vote
1answer
16 views

How can I use the in-built function alert in Gnome Schedule?

I want to access the alert function in Gnome Schedule. I can run alert from my default Bash command-line but receive the following error in Gnome Schedule: /tmp/tmpxi4X16: line 1: alert: command not ...
0
votes
0answers
21 views

atq command problem

I am trying to enable www-data to use the at commmand. First I deleted www-data in /etc/at.deny file and tried to execute the following command #sudo -u www-data atq I got this error You do not ...
1
vote
1answer
31 views

I have 5 hosts which i need to ping if any one down i should be alerted through an email it is possible..?

I have 5 hosts which i need to ping if any one down i should be alerted through an email it is possible..? and it will be checked with every 20 minutes. can anyone help me.. Thanks in advance... i ...
0
votes
1answer
20 views

I need a script file for checking (ping) 3 ip address are working or not

I need to create a script for checking (ping) 3 ip address are working or not. using the crone tab and i do want to know how is it working. I was used a script using a test file, but i need to get the ...
67
votes
6answers
109k views

“(CRON) info (No MTA installed, discarding output)” error in the syslog

I have a fresh install of Ubuntu 12.04.1 LTS an a number of servers. I have not added any cron jobs or edited my crontab on those servers, however, at around the same time for each machine, I get a ...
1
vote
1answer
50 views

Can't run Sikulix 1.1.0 on Ubuntu 15.10 with crontab

I try to run a Sikulix script but nothing happens. crontab: SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/absolute MAILTO="" # m h dom mon dow user ...
0
votes
1answer
17 views

auto start a reverse ssh tunnel on system startup

I am have a remote machine behind a firewall that I wish to connect to through SSH. As far as I understand this can be achieved by using a reverse ssh tunnel. So the command I am using is ssh -N ...
1
vote
1answer
23 views

How to schedule app to lauch including it's GUI

I have a calc spreadsheet that I'm trying to automate. When open, it collects data, calculates, saves itself and exits. So I created a script to call this. soffice --calc --norestore Updater.ods ...
0
votes
0answers
30 views

PHP Errors in mail

I've been getting these error messages sent to me a lot lately, pretty sure it's causing me a problem. From root@kallarserver Fri Apr 15 13:39:01 2016 Return-path: <root@kallarserver> ...
0
votes
0answers
35 views

Bash script to display XKCD comic - crontab not executing

I wrote a bash script to display the current xkcd comic in my web browser (using the RXKCD package in R). I want to schedule this so that the current xkcd comic displays every morning at 8am when I ...
0
votes
1answer
24 views

Cron job. Runs at minutes interval but otherwise when set at another time

During the test of my script. The cronjob should run a script through the browser every 2 minutes. So I had the following cron: */2 * * * * wget -O http://192.10.10.1/mypage/myscript.php The cron ...
0
votes
3answers
21 views

Cronjobs not showing up using crontab -u <user> -l

I added some jobs directly to the /etc/crontab file. They are running fine. However, I cannot see them if I use the ‍‍‍‍‍‍‍‍crontab‍‍ command crontab -u <user> -l Do I have to reindex ...
1
vote
4answers
182 views

How to change niceness of process by name

Java process is killing my computer (Intel i3, 8GB RAM). It takes over whole CPU and system starts to hang. I was trying to change niceness of java processes but i have to control it for all time and ...
2
votes
1answer
36 views

How do I set up a cron job on Snappy?

If I run sudo crontab -e I can edit the crontab, but it's read-only so nothing gets saved.
0
votes
0answers
42 views

Autostart .jar file with screen

How can I autostart a .jar file in screen at boot? I already have some other programs that start at boot, but the .jar file doesn't work for me.
21
votes
2answers
114k views

Script doesn't run via crontab but works fine standalone

I have a script that reminds me to restart my computer if uptime is more than, say 3 days (although its set to 0 days now just to check if the script is running as my computer has been up only over a ...
0
votes
1answer
34 views

Crontab entry to update my xmltv epg - xlm file - Ubuntu 14.04 LTS Server

I have made a small script like this:- #!/bin/sh tv_grab_uk_rt -output /var/www/xml/tv.xml and called it xml.sh. I have saved this script at /usr/bin/xmltvscript/xml.sh I can run this fine with ...
-3
votes
1answer
36 views

DDNS workaround

I just configured a ts3-server on an Ubuntu-machine and want it to be available all the time on the internet, but i don't have a static IP and my router doesn't support DDNS. Is it somehow possible to ...
-4
votes
0answers
19 views

Working with bright game pannel. Cron Jobs problem

while i am working with Bright game pannel i have been given these instructions: Copy the command given by the Cron Settings page (“Configuration/Cron Settings”). Under SSH (with putty etc.), edit the ...
0
votes
0answers
20 views

Edit crontab using editor set by update-alternatives instead of select-editor option

man crontab makes me think it is possible: The -e option is used to edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit from the ...
2
votes
2answers
2k 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 ...
0
votes
1answer
30 views

Scheduled backup of home server

I'm using Ubuntu 14.04.4 LTS as a home NAS server. I already made some scheduled rsync script to backup my photos, documents etc to an external drive. I want to do the same with the entire system, ...
1
vote
2answers
46 views

How to execute PHP code in Linux every 500 milliseconds?

I have an http server on Linux. I have some PHP code that stores variables into the cache using memcache and I would like to execute this code every 500 milliseconds whenever the server is running, ...
0
votes
0answers
15 views

Transfer Truncated error with debmirror

I am building my first linux virtual test lab (Ubuntu 14.04.4) and I am trying to create a partial local mirror using the debmirror tool and these instructions. The transfer is working, but keeps ...
1
vote
1answer
33 views

Crontab syntax; Multiple commands

I would like to get the following chain of commands as a cronjob: * * * * * source activate myenv3 && cd ~/foo/bar && python sssb.py It works in console, but I dont get any output ...
2
votes
2answers
458 views

reprepro - Is there any chance to enter the passphrase via bash-script?

I use "reprepro" for getting the latest Debian packages out of my local repository, which works fine manually. Now I need to automate this process through a cron job but the reprepro passphrase is a ...
1
vote
1answer
81 views

'source' builtin in bash not recognized in cron environment

A user crontab entry that reads: 0 */4 * * * $HOME/postscript/fprogcache-sync works fine. Wanting to add a few environment variables to the cron-job context, I then tried 0 */4 * * * source ...
0
votes
1answer
17 views

Cronjob is not running Properly

I have written a cron job as follow: 45 08/3 * * * bin/run.sh job it is getting started at 8:45 but Once it finished. Its not starting again .
0
votes
0answers
11 views

cron running init.d reload and getting exit code of 2 [duplicate]

I am having cron run a shell script which includes this line... /etc/init.d/nginx reload but it is giving me an exit code of 2...What can I do to reload nginx from cron successfully?
1
vote
1answer
20 views

Cron keeps running each 1 or 2 minutes

I have noticed that my cron script keeps running each 1 or 2 minutes after execution for almost 1 hour, since I have a lot of cron jobs, sometimes I could not access to my website, the browser keeps ...
0
votes
3answers
2k views

Run Cronjob every night between 3-6 o clock but only once

I want to run a cronjob daily at a specific time range but only once in that period. How is that possible? I see a possibility in anacrhon but don't know how to set up such scenario.
0
votes
0answers
29 views

SSD trim support… Do i have to do anything? [duplicate]

First i must state that i am totally new in Linux world. I totally ditched the operating system that i used for about 20 years now. So here i am with my first question... My laptop has an SSD inside ...
1
vote
0answers
47 views

crontab not run aria2c & script

I can 't run this script in sudo crontab -e #! /bin/bash sudo -u jali aria2c -c -x16 -s16 -j2 -k 1M -i /home/jali/Desktop/dl-list.txt -d /home/jali/Videos -l dllog --log-level=notice ( for i in ...
0
votes
1answer
11 views

Torgaurd will not start with Crontab at reboot [duplicate]

I'm currently using the guide posted on Torguard here. Everything work perfectly up until setting up the cronjob to start at reboot. This is the steps I've taken: crontab -e and then adding this ...
4
votes
5answers
23k 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>"; ...