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)

2
votes
1answer
151 views

Can I set up a cron job on Ubuntu Phone

I've been looking around, and can't find if Ubuntu Touch can run cron. So my question is: Can it? Also does it have a standard set of bash utils installed?
1
vote
0answers
15 views

Cron job doesn't execute php file and normal file

I have two files, that needs to be executed every evening. PHP file contains the latest records from database, and creates a source file in same directory. And a normal file, even doesnt execute. I ...
1
vote
1answer
6 views

Cannot get cron.service status using systemctl

I noticed my cronjobs were running at the incorrect times, so I changed my time zone. I now need to restart the cron daemon, but none of the commands I'm using are working for me. Every one of them ...
0
votes
1answer
33 views

Running Bash script at login

This question has been asked numerous times but for some reason, none of the solutions proposed worked for me. I just want to run a simple script after the user has logged in. Here are my attempts: ...
0
votes
1answer
10 views

Change timings of unattended updates

I have unattended updates set to run daily on a 14.04 server. It is run by cron.daily at midnight along with other jobs. I would like to change the time that unattended updates runs but not the other ...
3
votes
1answer
2k views

How to create a script to check for internet connection?

I'm new to programming in linux. I started bitcoin mining using linux mint xfce 15. I'm really good following directions, just don't know how to start. I need to create a script that can run every 15 ...
23
votes
6answers
20k 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
21 views

Cron doesn't start any command

I have a problem with cron on my Ubuntu VPS. Wanted to plan reboot for every day at 12:30 so I've used command crontab -e added line 30 12 * * * reboot And nothing yes I am logged as ROOT during ...
4
votes
1answer
3k views

shut down linux server and turn on automatically at specific time

I'm having an assignment where the lecturer is asking me to create a bash script to shut down a server at 11pm and turn it on at 6am. I'm able to do it by using sudo shutdown -h 23:00 and it works. ...
1
vote
0answers
28 views

How to check if a cron job is running or not through php script?

Back to my question How to check if a cron job is running or not?, the answer there is valid which stated to redirect output to a file and test. 15 * * * * /usr/bin/php ...
1
vote
3answers
50 views

How to check if a cron job is running or not?

I added the following command in crontab -e: 15 * * * * php /home/rizwan/PHP-workspace/mgstore/testcron.php I need to run testcron.php every 15 minutes; for testing purposes I used the following ...
14
votes
1answer
1k views

What happens if you use @reboot reboot in crontab file?

What would happen if you use: sudo crontab -e And add the line: @reboot reboot Will it go into a infinite loop of rebooting?!
1
vote
2answers
4k views

How to add the logs to a crontab with time stamp

In crontab, I scheduled a daily backup script. Now when the cron executes the script the status are logged to a log file as shown below. 0 0 * * * /home/backup.sh > ...
4
votes
0answers
42 views

Ubuntu 14.04 - crontab @reboot hang my PC

Trying to resolving the bug for KWORKERS HIGH CPU, as suggested in this answer. I put in my crontab the row: @reboot echo "disable" > /sys/firmware/acpi/interrupts/gpe06 After the reboot, the ...
3
votes
2answers
9k views

Shell script issue: cron job script to Restart MySQL server when it stops accidentally

I have this script, I am using it to setup CRON job to execute this script, so it can check if MySQL service is running; if not then it restart the MySQL service: #!/bin/bash service mysql status| ...
1
vote
0answers
13 views

Suspending when CPU idle

I am using 14.04 (Trusty). I have Power -> Suspend when inactive for 2 hours. This works fine if I am logged in and then walk away. But if I am not logged in, it never suspends. Moreover, I understand ...
1
vote
1answer
27 views

run script from directory using cron

I have this in my crontab: 59 23 * * * /home/peter/Documents/script.py > /home/peter/Documents/log.log 2>&1 But I keep getting /bin/sh: 1: /home/peter/Documents/script.py: not found in ...
0
votes
2answers
4k views

no crontab for [username] - using an empty one

I want to run a bash file (abc.sh) on the desktop that runs a python file on the desktop as well. How can I do that? I tried to do the following simple task just to test the crontab: (here the abc.sh ...
1
vote
1answer
21 views

Why doesn't my second cron task get run?

I have these two task to be run. The first one gets run every 1 minutes and I want the second one to be run at hour:minute every day every month. */1 * * * * python /root/vine/hei.py 22 20 * * * ...
1
vote
0answers
21 views

Accidentally enter “crontab” without -e

Now my root crontab is entirely blank. I enter some crone tasks into this blank crontab(I typed crontab -e again). Even though I see cron is running(pgrep cron returns a number), no cron job is ...
58
votes
4answers
86k views

Where is the user crontab stored?

Since upgrading my user's crontab has been wiped out. This is not the first time this has happened this year and it's a pain restoring it each time. I'd like to be able to back up the crontab for my ...
1
vote
2answers
3k 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
0answers
27 views

How to interpret this code?

I setup a cronjob send me notification using notify-send. I tried several methods from different several site and then finally below code works. 55 * * * * eval "export $(egrep -z ...
1
vote
1answer
39 views

Script to program periodic switch-on and off

My PC has a problem in its motherboard so when it's inactive for many hours after being on it won't start up, both when it's completely switched off or suspended. It takes between 8 to 18 hours to ...
0
votes
0answers
15 views

Improperly set display when running a root crontab job involving GUI

When running the script below from my local user crontab, with sudo before /usr/bin/FreeFileSync (last script's line), a small progress window opens on my GUI and things go well. The only thing is I ...
2
votes
0answers
36 views

cron.daily gives apt error. “not found”

I recently upgrade to Ubuntu 15.04 and after that I get these strange errors in my cron e-mail. Sadly I didn't remember what version of ubuntu I was upgrading from but I think it was the latest before ...
-1
votes
2answers
103 views

How to run a cron job every 36 hours?

I have been blowing my mind over few days to do this.. (Don't ask me why I want to do it!) How about adding two jobs like this? 00 06 current_day-31/3 * * job 00 18 next_day-31/3 * * job
48
votes
4answers
75k 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 ...
5
votes
1answer
120 views

How do I run a bash or python script via cron, visible on the local desktop

I have a production server that runs several bash scripts on the local desktop. Two scripts run all the time and don't need to be stopped. I have a third Python script that I need to start at 9AM. It ...
0
votes
1answer
39 views

Run “rails s” on another directory in a single line

I wanted to make a crontab expression at boot, running rails s in another directory. I can't find how to change directory in the same expression. I've tried rails s /directory but it doesn't work ...
1
vote
3answers
75 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 ...
1
vote
2answers
54 views

How can I start Steam with a cron job?

How can I start Steam using a cron job? I've tried just putting steam in cron, but it does not work. I've tried some odd stuff that I don't understand like DISPLAY=:0.0 steam %U but that does not ...
0
votes
0answers
22 views

Any problem launching script with infinite loop using cron?

If I run a shell script containing an infinite loop using cron @reboot, will that hang up the cron daemon or does cron keep moving and not wait for the job to terminate?
5
votes
3answers
8k views

Ubuntu 14.04 not running Bash scripts in /etc/cron.daily

I have a few scripts (that currently run in a CentOS system) I have moved to a new Ubuntu 14.04 system. These scripts are in the /etc/cron.daily to run once a day. These scripts are to run at the ...
7
votes
2answers
36k views

How can I see/stop current running crontab tasks?

How can I see crontab tasks which are in progress? How can I stop crontab tasks which are in progress, manually? Is [this] question about see the current running cron processes? Yes To ...
0
votes
1answer
41 views

MySQL Crontab Check

I have a serverpilot.io server running from digitalocean (1gb Ram), MySQL will crash once a week, the stats say the server is using ~256 mb out of 1 gb, but mysql will crash saying out of memory.... ...
3
votes
5answers
6k views

Cron jobs show up in GNOME Scheduler but don't execute

I have configured Back In Time and MySQL Administrator to make a backup every day at 15:00. In order to be sure I have installed Gnome Scheduler to see whether these two applications are registered ...
0
votes
0answers
22 views

Logrotate errors on weekends

Update: After a lot of trial and error, I figured out that my logrotate for the giant backup was causing all the errors on the other logrotates. I had tried to only get 2 rotations so it'd look like: ...
-1
votes
0answers
44 views

Script does not run properly under cron - restart OpenVPN

I have a OpenVPN Server, that I connect via a VM (Ubuntu 14.04). In this VM I have the following script, that checks if the connection is up, and then if it's down, it restarts the openvpn service. ...
2
votes
0answers
21 views

Crontab not running 24 hours

I've the following job in /etc/crontab: @hourly root /usr/bin/script Here is the script: #!/bin/bash killall tcpdump date=$(date +%G%m%d-%k%M) tcpdump -n port 5060 -w ...
0
votes
1answer
42 views

Help Creating Rsync/Crontab script that checks if ExtHD is mounted before running

I have a toshiba 3tb ExtHD and it consistently gets unmounted if I say shutdown computer then turn it on to a live cd then reboot back into OS. Its a simple fix, all I do is unplug and re-plug the USB ...
-1
votes
2answers
54 views

How To Start Python Script On Bootup [duplicate]

I have a couple of Python scripts I want to launch at bootup. One is located at the path below. /home/my-sickbeard-install/SickBeard.py Since Cron has never ever worked for me and nobody on about 5 ...
0
votes
1answer
24 views

App Won't Start On Bootup When Using Cron

I have a ts3.desktop file in my /usr/share/applications folder that I want to run on system boot. The procedure I used to try and get this working is below. crontab -e Then in the editor (it opens ...
0
votes
1answer
44 views

Is it there a Text User Interface (terminal application) which does what Kalarm do?

Since there's no updates on the enhancement request raised by @DavidJarvie on the KAlarm Project, documented in my previous question over here: http://askubuntu.com/a/257843/9598, I started wondering ...
5
votes
1answer
593 views

unattended-upgrades error: “/etc/cron.daily/apt: DB Update failed, database locked”

Ubuntu 14.04.1 LTS Since installing unattended-upgrades, the following error message is received daily: From root@xxxxx Thu Aug 28 06:36:06 2014 X-Original-To: root From: root@xxxxx (Cron Daemon) ...
0
votes
2answers
17 views

cron job wont execute the script

I have the below script #!/bin/sh tail -fn1 /app/agile/agile931/agileDomain/servers/01mustgagl01.natusmed.natus.com-AgileServer/logs/agileDomain.log| \ while read line ; do echo "$line" | ...
8
votes
6answers
5k 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 ...
1
vote
1answer
133 views

Disable TRIM to avoid file system corruption

I read the following article on a problem with TRIM and Samsumg. I am running Ubuntu 14.04.1 and I have a Samsung PRO 850 of 250GB. I am worried to get my file system damaged due to same firmware ...
3
votes
4answers
2k views

Cron not able to succesfully change background

I'm running 12.04 with a custom XML background (modification on Day of Ubuntu) that changes based on time of day. I've noticed that there's a significant delay between when the changes are scheduled ...
0
votes
1answer
23 views

Periodically cut and paste files

I'm running a model that generates quite a stream of outputs. In fact they are so many that it ends up dying because the hard-drive is filled up Is there a way (maybe with cron) to periodically scan ...