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
10 views

“Permission denied (publickey)” ubuntu 14.04 No supported authentication methods availble

I wanted to set up crontab to fetch resources from remote server to local server. Steps used as below In local server 1. ssh-keygen with no passphrase 2. copied the pubic key over to the server ...
2
votes
0answers
18 views

Scheduling Cron Job for a Specific Hour Range in a Week

I'm looking to run a cron job for specific hours in a week. The reason I'm doing this is due to the timezone being pegged exactly 7 hours ahead of New York time irrespective of daylight savings (this ...
0
votes
1answer
24 views

Why the auto reboot not working?

Why the system is not rebooting? i have this following in the crontab under root username. uptime: 08:43:06 up 10 days, 13:28, 2 users, load average: 0,17, 0,08, 0,06 but it should be rebooting ...
0
votes
4answers
91 views

Magento PHP cron job fail to open required php files

We are trying to set up cron job for Magento site. We tried this Job, but it didn't work for us: */5 * * * * php -f /var/www/html/sitename/cron.php To debug we tried this Job: */5 * * * * ...
1
vote
1answer
21 views

How to Defrag XFS

I have a /home partition in a separate disk with XFS, how do I de-fragment it ? (on-line or off-line) I haven't tried anything yet and the / partition has BTRFS. Also how to schedule it would be ...
0
votes
1answer
25 views

SSH fails in Crontab after reboot

I am regularly running a shell script through Crontab that uses SSH to connect to a server. If I run that script manually it runs through successfully. Within the same session Crontab will ...
0
votes
2answers
44 views

run php file from cron and start browser through exec on ubuntu [duplicate]

I am trying to start FireFox from php script using exec("firefox"). This works fine if i run php file from the terminal but does not work when run by the cron. User for cron & terminal is root. ...
1
vote
1answer
90 views

Rebooting computer using cronjob doesn't work

I have a kiosk application running on Ubuntu Server 14.04. In my kiosk app there is a link to reboot the system which just defaults to some PHP page that run: exec('sudo reboot'); If the user ...
1
vote
0answers
25 views

Why might this “reboot on ping fail” script not be working?

I have an unresolved problem with my vps falling off the network. There's no reply and the webhost have no idea, so I thought this bash script should work #!/bin/sh ping -c5 8.8.8.8 if [ $? -eq 0 ]; ...
1
vote
0answers
48 views

Not able to execute a url from python script running via Cron

I have a script web.py which I am trying to run on the aws EC2 Instance using cron. It basically has these line of codes: import webbrowser webbrowser.open('http://xxxxxxxxxxxxxxxxxxxxxxxxxxxx') If ...
0
votes
0answers
22 views

How to start a Python script in LXTerminal using crontab at boot-up

I have a script called myscript.py (in /home/pi) that I want to run in the terminal every time the Pi boot up. I want to activate this by using 'crontab'. However after searching and trying stuff ...
1
vote
0answers
37 views

Can't start a job with Cron on Ubuntu startup

I am trying to get a simple Python script running on startup with Cron on Ubuntu 16.04. What I did is opened cron with: sudo crontab -e and added the last line as shown in the screenshot: I even ...
1
vote
0answers
29 views

Get a list of all scripts and their paths which are run as cron job

I am looking for some script or terminal command to list all the scripts (preferably with their paths) which are run on a periodic basis by cron, cron.daily, anacron. I am not looking for any filter ...
0
votes
2answers
48 views

How to set up cron to call php script - bash: */5: No such file or directory for setting cron job

we are trying to set up cron for magento site running in ubuntu server we are trying following command : */5 * * * * php -f /var/www/html/sitename/cron.php but we are getting error as below : ...
1
vote
2answers
23 views

CronJob to copy a directory on a remote server

I Need to create a Cronb that will run daily on my server and will ftp into a remote server with a username and password. It will copy a directory on that server and copy it onto a directory on my ...
1
vote
0answers
19 views

Ubuntu Upgrade not finishing

I am upgrading ubuntu 14.10 to 16 LTS using a DVD and well it has been at the saving installed packages phase for more than 2 hours.What should I do? Here is a screenshot
9
votes
2answers
378 views

Make a new archive once per minute using “crontab”

I am trying to make a crontab that makes a new .tar file each minute every business day by using the following code: */1 * * * 1,2,3,4,5 tar -cf /home/user/Archiv/$(date +"%Y%m%d%H%M").tar ...
3
votes
1answer
135 views

Using % in a cron command

Since the % has special meaning to cron, how do I use it as part of a command? I found this page http://www.hcidata.info/crontab.htm, which mentions piping echo and sed to escape the % and then ...
266
votes
39answers
417k views

Reasons why crontab does not work

Often, crontab scripts are not executed on schedule or as expected. There are numerous reasons for that: wrong crontab notation permissions problem environment variables This community wiki aims ...
0
votes
1answer
25 views

My bash script doesn't work when triggered by crontab, but works when i trigger it manually?

this is the cron entry */1 * * * * ./home/usr/automation/check_rejected_files.sh > /home/usr/automation/cronout it produce the file but nothing else happen, i added a date log in the beginning ...
1
vote
0answers
20 views

how do I get the atd daemon log at commands?

On HPUX all at jobs are logged in a cron.log file. Alas I cannot find similar on Ubuntu. I see cron is logged to syslog and I can change rsyslog to log to a cron.log. But my attempts to log at.* ...
0
votes
0answers
7 views

Can either Postfix or Cron Daemon mix up simultneous cron jobs' stderr reports?

I have a use case on a Trusty Desktop LTS box, where two (non-root) cron jobs trigger simultaneously: # cron entry #1 # `rsync' Mozilla FF's profile from RAM-DISK to SSD every 4 hrs. # (FF's profile ...
0
votes
1answer
30 views

Script to send Email if Log grows past 90M

I have the Below Script to check the size of my Log file. Should it grow to beyond 84M to should be renamed with the current date and a a new one is automatically generated by my APP. However it ...
0
votes
0answers
15 views

How to stop x11vnc from shutting down when I log out?

At boot I have sudo x11vnc -xkb -noxrecord -forever -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -usepw run via init.d It works and shows me the login prompt when I use a VNC ...
3
votes
1answer
28 views

cron email from address

a linux machine executes a cron job for a script every night that does a backup, this should then send an email to us with the basic results. However since moving to a spam filtering platform its ...
2
votes
2answers
28 views

How do I block myself from logging in over the weekend?

I'm wondering if anyone has ever written a cron script that blocks ones remote access (specifically a linux email server that I access via alpine on my local linux machine over an ssh connection) over ...
0
votes
2answers
563 views

Can't seem to get script/cron job to work? [duplicate]

ive written a ffmpeg script to mass convert mkv into mp4. when i run the script as my user, and enter my password for sudo privileges it works very well from the command line. the script is: #! ...
32
votes
5answers
26k views

Cron.hourly won't run

Ok, So I've made my script, I dropped it in /etc/cron.hourly then I chmod 777 the file but it won't run (automatically). If I manually run it, it works fine. Do I need to do anything else?
-1
votes
0answers
15 views

running scripts and emails

first of all let me say that im a linux noob, windows im fine with! We have taken over from a previous guy and he has a custom script which basically copies data from the main nas to the backup nas, ...
0
votes
1answer
22 views

How can execute a cron at machine sturtup?

I am trying to make a cron for my machine. It there a possibility I to make it for every starting up of my pc? Some way like this : # File : /tmp/crontab.LgVuXf/crontab uptime ... command
0
votes
0answers
29 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 ...
0
votes
0answers
24 views

Ccrontab script returns empty output

I'm writing a simple bash script for analysing disk health status with smartctl and when i run it in a terminal or by script all works fine: for i in {0..5}; do echo "***** /dev/sda$i *****"; ...
0
votes
1answer
83 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
20 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 >> ...
4
votes
2answers
460 views

Cron jobs are disabled on clean installation of 14.04

I have a clean installation of Ubuntu 14.04 and in my /etc/cron.daily/ I see *.disabled files: -rwxr-xr-x 1 root root 15481 Apr 10 09:04 apt.disabled -rwxr-xr-x 1 root root 314 Feb 17 2014 ...
10
votes
2answers
56k 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 ...
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
12 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
10 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 ...
-1
votes
1answer
35 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
21 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
39 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
24 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
41 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
521 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
17 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 ...
264
votes
5answers
405k 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
32 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
56 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
17 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 ...