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
1answer
8 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
41 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
21 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
52 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
30 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 ...
-1
votes
0answers
18 views

How to keep cluster systems in sync [on hold]

I am wanting my devices on my cluster which all have the exact same specs (Raspberry Pis) to completely be in permanent sync. I have been thinking of using a cron along with an rsync but I am not ...
0
votes
1answer
26 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
83 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
23 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
36 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
29 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
15 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
46 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
48 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
26 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
41 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
21 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
37 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
46 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
56 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 ...
1
vote
1answer
61 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
12 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
28 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
31 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
33 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
27 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
158 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
26 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
16 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
114 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
77 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
57 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
43 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
58 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
33 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
75 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 ...
0
votes
0answers
33 views

nfdump schedule with cron

Hi I tried to generate nfdump file with crontab, but whatever the reason it dosent work my script #!/bin/bash nfdump -mR /home/user/test -zw /data/fnf1.dump this script itself works and all other ...
0
votes
1answer
49 views

How to disable network with crontab on ubuntu 14.04?

I am using Ubuntu 14.04 and try to disable network on scheduled time everyday. For example disable it at 5pm everyday. The first thing I tried is crontab as below: 0 17 * * * nmcli nm enable false ...
0
votes
2answers
97 views

Custom Daily and Weekly Cron Jobs Not Running

I created a script to back up my databases and my websites. It runs fine if I run it straight up but it's not running at all as a cron job. I created a symbolic link to the script: lrwxrwxrwx 1 root ...
0
votes
0answers
63 views

Running cron scripts with php and node

I've gone through many posts for cron jobs, but still was unable to run it on my Ubuntu 14.04 environment. I have a file test.sh in /tmp/test/. The test.sh contains several other scripts in PHP and ...
0
votes
1answer
18 views

Crontab once a weekday at startup

Is that possible to run task once a week at startup? For example: on monday after reboot starts command 1 on tuesday after reboot starts command 2 (but does not starts command1)
0
votes
0answers
33 views

Running apt-get upgrade in crontab

Adding sudo apt-get upgrade -y into crontab as a daily. This seems like a very good idea to make sure everything is automatically kept updated, but nobodys ever mentioned it before (and recommend ...
3
votes
1answer
42 views

Lubuntu updatedb.locate may scap bind mounted nfs file systems

I noticed that cron.daily that run updatedb.locate was talking very long to complete (if ever completing). I have interrupted last run with find taking more than 16 hours of CPU time. After ...
0
votes
1answer
15 views

Missing log file

I wrote a .jar file that is supposed to be run once a day that interacts with Google App Engine. When I run it from the computer, it runs just fine and creates a logfile that details some statistics. ...