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
1answer
188 views

confusion about cron and anacron (setting up backup schedule for rsnapshot)

I am trying to set up a not too complicated backup schedule with rsnapshot on a laptop running Ubuntu 16.04 LTS. The plan is to retain two daily backups and 24 hourly backups. I think this is the ...
0
votes
1answer
25 views

How to modify the default 'sender' and 'subject' in cronjob failure email?

I setup a cronjob that sends me email on failure. The problem is it's coming from Cron Daemon and the subject is Cron <ubuntu@ip-10-100-21-10> /home/ubuntu/neo/bin/backup-test.sh >> /home/...
0
votes
0answers
32 views

Cron script runs but dpkg command fails

I have a cron script that updates a package with dpkg. This is an oversimplified version of a much larger script. But this is the part that is not working. I copy the update cron script to /etc/...
1
vote
2answers
47 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
13 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
11 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
2answers
24 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 ...
-1
votes
1answer
44 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 Mod....
0
votes
2answers
30 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
57 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 ...
3
votes
1answer
46 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
0answers
21 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
19 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 ...
0
votes
2answers
61 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 --...
1
vote
1answer
26 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
31 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
37 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
64 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 ...
0
votes
1answer
40 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
30 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
37 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> Envelope-...
0
votes
2answers
44 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 ...
1
vote
1answer
79 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
29 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
27 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 ...
2
votes
1answer
47 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
45 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.
1
vote
0answers
44 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
64 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 ...
0
votes
0answers
34 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 ...
0
votes
1answer
33 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, ...
0
votes
0answers
20 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
2answers
75 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, ...
1
vote
1answer
57 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 ...
1
vote
1answer
103 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 $HOME/....
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
27 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
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
55 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
20 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 ...
1
vote
1answer
45 views

Edit crontab with an editor other than the default

I would like to edit crontab with vi once. My default editor is nano, and I want to keep it that way. I only want to edit with vi one time. I don't want to change the default to vi then back to ...
-1
votes
1answer
41 views

Permission Denied in Cron Job

Super newb here, I am running an Ubuntu Server as a home NAS and everything is going well, i've created a bash script to download an XML TV guide from the internet for my PVR back-end, then move and ...
3
votes
0answers
56 views

Cron using a command that asks for password

I was able to fix this by using the encfs -S option, this pulls the password from a file instead of prompting for the password every time the script is run. This is not very secure as the password is ...
1
vote
2answers
72 views

Why is my crontab command not working?

I don't know what the problem is. I'm very confused. I'm using that command: crontab -e Crontab content: # Edit this file to introduce tasks to be run by cron. # # Each task to run has to be ...
0
votes
1answer
23 views

Is crontab's @reboot entry triggered after X has started?

Using crontab -e I have added an entry to my cron tab file @reboot /home/rene/misc/change-layout.sh change-layout.sh contains some xmodmap -e statements to change to keyboard layout. When I ...
1
vote
1answer
42 views

Hourly and daily crons are not running

I've noticed that hourly and daily crons are not running, I moved them to crontab, and everything is fine: #!/bin/bash now=$(date) echo 'It is '$now The command line: # run-parts --test /etc/cron....
0
votes
0answers
52 views

Why is my crontab not running my bash script?

I have a bash script which I want to run every 5 minutes with cron, but for some kind of reason it's not running? I've followed some guides, but no luck this is my crontab -e: SHELL=/bin/bash 0,5 * ...
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
61 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 ...