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)

1
vote
0answers
15 views

Screen in crontab

I'm trying to run 9 screens windows by crontab, and then, run some codes (basically the same for all of them), but they don't work. The code runs all of 9 screens, but run code only on the first. Aah, ...
0
votes
2answers
28 views

Where are cron logs stored on Ubuntu 14.04?

I am trying to troubleshoot why my cron task isn't working sometimes. Where does cron store log files by default? Is it /var/log/syslog ? I have looked at that file and it is empty. Do I need to ...
1
vote
0answers
19 views

First-time backup landed in the wrong place

I used Backups with the following settings: Folders to save: Home(jeg) [ON] Folders to ignore: Trash, ~/Downloads [ON] Storage location: 799 GB Volume [ON] Folder: LinuxBackupDirectory [ON] ...
0
votes
1answer
42 views

How to create a perl script which checks the system stats(CPU,RAM,HDD) and sends an alert mail? [closed]

The script is for adding to the cron tab. The flow of the shell script should be like this. 1. Checks the CPU state. 2. Checks the RAM usage. 3. Checks the HDD usage. 4.Sends an alert mail to ...
1
vote
1answer
31 views

Cron script Exec format error

My cron job/script fails. I'm running mythbuntu 14.04. With previous version of Mythbuntu I have a problem, any help would be greatly appreciated! I set up cron.daily with: $ ls -la ...
4
votes
2answers
61 views

Why my bash-script doesn't work with cron?

I created a bash script to automatically update my Ubuntu Server. Here is the script: #!/bin/bash apt-get update apt-get upgrade echo "Update am $(date "+%d. %m. %y|%H:%M:%S) >> ...
2
votes
2answers
21 views

kcron not running commands

When I add a new command to kcron it seems to work fine. I hit Run Now and it works perfectly. BUT when the task is scheduled it never runs. How do I get kcron to run commands exactly as Konsole can ...
0
votes
0answers
27 views

Why does rsync run in crontab not work the same as from the command line?

I have rsync scheduled to run in my root crontab with the archive option: 0 22 * * 6 /usr/bin/rsync -avv --delete --log-file=/home/brian/rsync.log /home /media/wdsentinel/home_backup When I add ...
2
votes
0answers
102 views

How to make speaking clock ( via cron and festival tts) work while playing music

I switched to linux since last 11 months,I am on ubuntu 15.04, I have learned to use cron for various tasks. I use Cron to announce time via festival tts(using mbrolla voice) hourly. This is the ...
0
votes
1answer
18 views

how to run scheduled task ,after resume from sleep,only if computer was sleeping at the time of schedule

i have a cron backup job set up, but i would like it to run after resume from sleep, if my computer was asleep at the scheduled time. example: backup script runs every night at 2:00. often i put my ...
1
vote
2answers
53 views

error while cron scheduling a sh script

This is my shell script which i want to schedule using cron job. parser.sh #!/bin/bash source .profile workon venv cd /home/ashish/deployments/myproject export ...
1
vote
1answer
29 views

ifdown in cron bash script fails to run

I have a script that is run when a server (Ubuntu 14.04) boots up using @reboot in crontab (Under the root user) @reboot /bin/bash /root/init.sh >> /var/logs/vminit.log The script runs a ...
1
vote
2answers
61 views

How to execute a php script using cron?

I am trying to execute a php file via cron every 2 minutes, but it's not working. My crontab is: */2 * * * * usr/bin/php /var/www/test/cron.php What am I doing wrong?
2
votes
1answer
38 views

Reset hibernation delay from command line

My hibernation on Ubuntu 14.04 LTS works fine. But someone keeps changing its delay to never hibernate. I am tired of paying days' worth of electricity for 10 minutes usage a day. Is there a way I ...
1
vote
1answer
28 views

Cron can't find file at night? [duplicate]

I have a cron job written to root (I'm writing to a log in /var/log so need root permission). The problem is that sometimes it works, and sometimes it doesn't. The cron job is simply to call a python ...
0
votes
1answer
31 views

sleep getting hang in shell script

I had a cron script running on my Ubuntu PC ( 12.04.3 ) which periodically checks for disk space. There was a "sleep 5" also used in this script. This system was up for a month, but an issue is ...
3
votes
2answers
100 views

Why putting a script in /etc/cron.hourly is not working?

I put an executable script in /etc/cron.hourly, but that script didn't run every hour actually it never runs at all. Here is the script(Hour-sound) that i made: #!/bin/bash mplayer ...
1
vote
1answer
31 views

log cron job in real time

I have a Python process which I run nightly via a crontab. It scrapes an API which I have limited access to so regularly has to stop and wait for an hour. By my estimates the job should take 5-6 ...
1
vote
2answers
40 views

What is the correct way to edit a crontab file?

I am trying to automate the refreshing of awstats for my webserver and understand that i need to use cron to set that up. So each user has a crontab file? I was following the instructions here ...
2
votes
0answers
35 views

No crontab for user, yet cron jobs are running

I have no apparent crontab: $ contab -l no crontab for gauthier Yet, something seems to be running as my user: $ tail /var/log/syslog ... Apr 13 16:25:01 sobel CRON[22043]: (gauthier) CMD (rsync ...
2
votes
1answer
15 views

Time based access to samba server

I have a 14.04 server running samba. I'd like to institute some time based access to the server. I host media for the whole house, and the goal is for the kids' televisions to become useless at a ...
-1
votes
1answer
18 views

different behavior of script when it runs on crontab

I'm trying to write a script that checks if mysql is running, and if not restart it... i get a script to run perfectly if is called manually from terminal, but when i added to crontab it outputs is ...
4
votes
1answer
69 views

Permanently raising nofile limits in Ubuntu 14.04 LTS

I cannot seem to figure out what exactly is needed to allow the maximum number of file descriptors to be raised permanently for all users. /etc/security/limits.conf: root hard nofile ...
3
votes
1answer
55 views

Create zip files in /var/www/html using crontabs

As the title explains, I'd need to take a file and put it into a zip archive once a day; also, the zip file has to be moved in /var/www/html, where a .php scripts allow users to download it. Assuming ...
0
votes
0answers
29 views

An Nmap Script and Crontab

I have created a script that will run an Nmap scan, then go through the results and see what is different from past results. Then email the differences. I have been trying to get it to run ...
1
vote
1answer
49 views

Command works on terminal but doesn't work in cron [duplicate]

I have the following command that I can run from any folder and it will start my (Angularjs) webapp by using the grunt task runner tool - cd /root/dev/myapp && grunt serve However when I ...
0
votes
1answer
25 views

Where do I look for cron errors [duplicate]

I have 2 cron jobs that were running fine but now stopped running. I looked through my crontab and everything looks OK. How can I tell if these jobs are running? is there a place where cron stores ...
0
votes
0answers
41 views

Ubuntu shuts down unexpectedly, Every night

I know this sounds weird but unfortunately it's real. I have Ubuntu 14.04 LTS running on Dell Inspiron N5150 Laptop with intel i7 CPU and nvidia GeForce GPU. Every night between 9:30 pm and 11 pm ...
1
vote
1answer
65 views

Cron jobs with R scripts

I am trying to schedule cron job for an R script. I've read this question How do I set cron job and followed suggestions from first answer. I typed crontab -e In the command line and put there a ...
1
vote
2answers
64 views

.sh ffmpeg works manually, not with CRON

I make a movie from jpeg pictures with the script: #create movie ffmpeg -i /home/philippe/Dropbox/Public/Cheiron/day/%d.jpg -r 25 -q:a 5 -pix_fmt yuv420p ...
2
votes
1answer
69 views

What is messing up my system clock?

Ubuntu 14.04 desktop, 64-bit I came in to work this morning and noticed that the clock on my system was off by approximately 3 minutes, as compared to the clock on my phone. That seems odd, since my ...
0
votes
0answers
14 views

cron.daily message - return code 100

I searched for a return code and found many similar but not this identical one. It's not an error per se, but I would like to know what it means. Email from root: Subject: Cron test -x ...
0
votes
1answer
29 views

watch internet connection thoguh shell

I just need to run a shell script when an internet connection is available. Is it possible to watch the internet connection arability through Shell scripting. ping google.com is the easy command to ...
0
votes
2answers
39 views

is it possible to rsync to another server using crontab?

Hi there is a bunch of videos and resources on how to rsync locally rsync /home/user1 /home/user2/backup, but i haven't found any tutorials on rsync crontab to another server pretty much, i use ...
1
vote
0answers
35 views

Bleachbit cron problems

I've been trying to get gnome-schedule to automate bleachbit but the crons never work. So after trying a lot different things I decided to just try setting crons the normal way. I opened terminal and ...
1
vote
0answers
30 views

Turn thinkpad screen off and back on automatically via cron

I setup my thinkpad a while back with ubuntu 10.10 to work as a digital picture frame and each night turn off the screen with a cron cron command, then in the morning another cron command turns it ...
3
votes
1answer
343 views

Recording a youtube live stream using vlc

I'm trying to set vlc to record a live stream on youtube using cron. Vlc records videos that aren't live streaming just fine, but when the stream is live vlc records at most only 24 seconds. Why ...
0
votes
0answers
21 views

How to Schedule Rsync over SSH (Ubuntu Server, Windows and OS X Clients) [duplicate]

On OS X I want to create a cron job that rsyncs certain folders to my Ubuntu server. I do something like this: MAILTO="my@email.com" */5 * * * * rsync -avz '/local folder/' ...
0
votes
0answers
21 views

Cron job for running gedit not working [duplicate]

I'm trying to set up a cron job that fires up gedit and displays a file at a certain time every day, but it's not working for me. To test it, I entered a time 3 minutes into the future, like this ...
1
vote
0answers
30 views

Why ps produce different output when it is started from a cron job?

When I run ps -f -u $USER ($USER is ubuntu) this is the output I get. USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND ubuntu 23517 0.0 0.1 22244 4856 pts/5 Ss+ ...
0
votes
0answers
17 views

How does the system interprets sudoers file when there are two lines for the same user?

I have a system with a user already added to sudoers file with username ALL=(ALL:ALL) ALL Now I want to allow username to run a single script without asking for sudo password (cron job). This ...
0
votes
1answer
187 views

CRON doesn't run tasks because “/bin/bash: /var/log/cron.log: Permission denied”

I have the following CRON task: MAILTO="my@email.com" # Begin Whenever generated tasks for: projectname 30 4 * * * /bin/bash -l -c 'cd /home/deployer/apps/project_production/releases/20150305135322 ...
0
votes
0answers
79 views

How to wake up my Laptop from sleep (suspend) when AC charger connected

In my area, electricity turned off for some periods, so I configured my laptop to goes to sleep when battery percent 10%, but I want it to wake up after AC charger is charging on. is there any way to ...
2
votes
1answer
59 views

can't find package crontab-ubuntu 12.04

I am trying to install cron for scheduling and before anyone says duplicate, I have tried the methods of sudo apt-get update and upgrade mentioned and they don't work. When I go to install crontab, ...
0
votes
1answer
24 views

What if 100 or more cron setup?

Regarding cron jobs in ubunutu. */1 * * * * /usr/bin/curl --silent http://local001.erp/snippetbucket/scheduler.php */1 * * * * /usr/bin/curl --silent ...
1
vote
1answer
48 views

How to run logout with cron?

I'm creating something to allow me to set limits for time spent per user session: I've created a cron job: */120 * * * 1,2,3,4,5 /path/to/command */180 * * * 0,6 /path/to/command and I want to run ...
0
votes
0answers
64 views

Cron job not running at time intervals

I am new to using cron to automatically run a script. Currently, I have created a script to run every hour using the Configure Scheduled Tasks Manager. In the manager it allows me to instantly run a ...
1
vote
2answers
38 views

Can I add a cron job without editing a file? [duplicate]

I want to write a script that add a cron job to my crontab but without user intervention like editing a file using crontab -e. Is there a way to programatically manipulate the cron jobs from command ...
0
votes
0answers
17 views

Pngquant returns error in Crontab [duplicate]

I have created a small script to compress all the images using pngquant in Ubuntu 14.04. The script is as follows: #!/bin/bash find /home/ghosthut/wp-content/uploads -mtime -2 -iname '*.png' -print0 ...
0
votes
1answer
85 views

Does sudo crontab -e on Ubuntu Desktop 14.04.1 work

I'm running 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Its the desktop version not the server version I needed to create some cron jobs I sudo vi ...