Questions tagged [cron]

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.

636 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
1 answer
1k 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 ...
user4349490's user avatar
1 vote
0 answers
959 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 ...
Noob big time's user avatar
1 vote
0 answers
268 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 ...
multigoodverse's user avatar
1 vote
0 answers
637 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 ...
Mohsen Ibrahim's user avatar
1 vote
1 answer
524 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 ...
Sajinu's user avatar
  • 21
1 vote
0 answers
155 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 ...
Paul's user avatar
  • 233
1 vote
0 answers
3k views

Start Ampps, with root permissions, once desktop loads

Been hacking my way through getting Ampps to work on Ubuntu. Ampps will be used to use host a local Web app for my families business, and I need Ampps to start when Ubuntu starts, always. I figure I ...
Krik's user avatar
  • 111
1 vote
0 answers
508 views

Zombie being made from 'tail -f' cron job that grep's and launches shell script

I realize that a single zombie process like this is nothing to worry about, I just want a more professional outcome (no zombie) from my code. My cron job calling a shell script produces a single ...
kenneth558's user avatar
1 vote
1 answer
4k views

Anacron starts but does not run cron.daily

$ grep anacron /var/log/syslog Feb 20 19:05:11 jesus-Custom-PC anacron[1410]: Anacron 2.3 started on 2016-02-20 Feb 20 19:05:11 jesus-Custom-PC anacron[1410]: Normal exit (0 jobs run) Feb 20 19:05:13 ...
Jesús Martín Berlanga's user avatar
1 vote
1 answer
20 views

Reversing cron job mail activity

Hiii I want to check the reason behind failure of cron job mail activity without accessing server's maillog ? Is there any other way to check 'why mail wasn't send ?
Nikhil Kelkar's user avatar
1 vote
1 answer
984 views

Database Data transfer from one server to another server in linux

Hi this is Ravindra and i have one question that i want to copy table data from one database server to another pc database server periodically after 7 or 10 days automatically in linux through cron ...
ravindra's user avatar
1 vote
0 answers
311 views

How can I run a custom script on /usr/bin/ via cronjob?

First of all: This is not a duplicated of Cronjobs made via cronjob not working which seems to be fixed by simply giving execution permissions to the script and/or adding the #!/bin/bash at the ...
Geppettvs D'Constanzo's user avatar
1 vote
1 answer
3k views

Crontab to stop and restart a server

I have a node.js server running in my linux VPS. Currently I go to the server's directory and type node server.js. After 1 hour I must stop it and restart. So what I'm doing is resume the server ...
Marciel Fonseca's user avatar
1 vote
0 answers
221 views

crontab run sequentially

I have to run crontab in xvfb display mode forever when the system restarts...below is crontab code.... @reboot nohup Xvfb :1 -screen 0 1024x768x24 & export DISPLAY=":1" @reboot /usr/bin/forever ...
Your Friend's user avatar
1 vote
0 answers
174 views

Evernote: script that can incrementally download full db where note = file?

Is there any script to incrementally download my Evernote database in plaintext? I need to have not one big file but many files (with attachments) - I want to use cron for everyday backup to git and ...
Vitaly Zdanevich's user avatar
1 vote
0 answers
665 views

How can simulate mouse clicks in a cron job on a headless machine?

I have a headless machine running Ubuntu 14.04 LTS. I'd like to set up a cron job to daily click some buttons on a web page. I often use X2Go, and I know I could manually open an X session and use ...
aswine's user avatar
  • 227
1 vote
1 answer
2k views

How to configure a script to start automatically after server reboot

I want to configure a script to execute automatically when a server is rebooted. Currently I need to start the script manually after server reboot. I am using Amazon Linux server. I was able to ...
Paul Sen's user avatar
  • 111
1 vote
0 answers
329 views

restarting custom kiosk service with cronjob

I have a google chrome kiosk set on top of Ubuntu Server 14.04.3. What I want to do is to restart the kiosk every day at midnight. As a test I set a cronjob to restart the kiosk every minute in order ...
kfirba's user avatar
  • 299
1 vote
1 answer
1k views

Rsync full backup --exclude option not working

I run the following command as sudo everything works fine: rsync -aAXv --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found",”/home/*/.thumbnails/*”,”/...
jaskerx's user avatar
  • 11
1 vote
0 answers
969 views

Cron not working but manually run in terminal works

I placed a command in a script file called app.sh that simply execute an application. sh app.sh When I run it with terminal directly works fine!! but when put it under cron does not work..I tired ...
Evan S's user avatar
  • 377
1 vote
0 answers
176 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 ...
Rafee's user avatar
  • 167
1 vote
0 answers
1k 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 /home/rizwan/PHP-workspace/...
Rizwan's user avatar
  • 39
1 vote
1 answer
355 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 ...
Charles Lindsey's user avatar
1 vote
1 answer
52 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 log....
Peter North's user avatar
1 vote
1 answer
58 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 * * * ...
Zip's user avatar
  • 121
1 vote
0 answers
480 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 ...
Zip's user avatar
  • 121
1 vote
0 answers
20 views

How to track the Internet connectivity of two PCs simultaneously using a script?

I have two PCs and I want to monitor the Internet connectivity in both of them and make it available in a page (not local, and something like example.com/statuses) as to whether they're currently ...
Joseph John's user avatar
1 vote
1 answer
2k views

Crontab - don't log? How can I do it right?

I've search for a answer of my problem but I can't find the right one. So I try it my self. I've got an Ubuntu Server and try to create a TeamSpeak3 Server - check file with loggin function. This ...
Chuckl0r's user avatar
1 vote
0 answers
778 views

Log rotate daily time for specific application

I know that similar question has been already asked, but there was something I am missing: Is there any option to specify the hour of rotating the logs, but only for one application ? I know that ...
user413895's user avatar
1 vote
0 answers
752 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, ...
Cleyton Bonamigo's user avatar
1 vote
0 answers
61 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] ...
JEG's user avatar
  • 201
1 vote
0 answers
441 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 the ...
Fourat's user avatar
  • 221
1 vote
0 answers
274 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 ...
user384925's user avatar
1 vote
0 answers
191 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 ...
user277244's user avatar
1 vote
0 answers
180 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+ 04:...
Anthony Kong's user avatar
1 vote
1 answer
262 views

How to implement in upstart that a service is preventive restarted every x hours?

I have a component --- started with upstart --- with a bug. The bug causes the application to freeze and unfortunately, it does not crush. As a temporary walk-around, I want to force the service to ...
Skarab's user avatar
  • 243
1 vote
1 answer
3k views

Crontab not executing script with cURL

I have a cron that's set to run every ten minutes that works fine if I execute the file manually by entering php register.php But, my cron will not execute this file once it includes anything cURL ...
Lance's user avatar
  • 111
1 vote
1 answer
746 views

Running a Screen instance of a program as non-root

I've got a dedicated server (Ubuntu 12.04, no GUI) set up to launch an instance of McMyAdmin and attach it to a screen instance every time I reboot the hardware. I have the command saved to root's ...
user288467's user avatar
1 vote
0 answers
154 views

syslog time is not matching cron string setup

I am running many cronjobs in my server. When I was checking the syslog file to see the cron timing, it's completely not matching. Can someone help me to understand. syslog May 23 00:00:01 xxxxxx ...
Gowri's user avatar
  • 141
1 vote
0 answers
605 views

Allow user to run programs as root without password. Would it be the correct solution to my problem?

I have a server which I need to be running certain programs permanently; I'm having problems with two of them and I'm not sure if the solution I've found would be the correct one, so I ask for opinion ...
Alberto Martín's user avatar
1 vote
0 answers
110 views

Any reason why Ubuntu's man page on crontab(5) is less informative?

Why is the man page for crontab(5) at manpages.ubuntu.com less informative than corresponding man page at linux.die.net? Compare The "sixth" field (the rest of the line) specifies the command to ...
DK Bose's user avatar
  • 42.6k
1 vote
0 answers
95 views

Make CronTab not asking for id_rsa keyword when running in terminal

I like to do some git pull inside a script and see see output of it. So I made up this cronjob to test: DISPLAY=:0 * * * * * mike /usr/bin/gnome-terminal -x zsh -c "/var/www/up.sh; zsh" --window-with-...
LeMike's user avatar
  • 275
1 vote
1 answer
763 views

Why do I get that error from a CRON job?

I am trying to write a cron script to check if my minecraft server is running or not and if it is down to run the start up script. Here is what I have and this is the error I get when running it /...
smally2189's user avatar
1 vote
0 answers
159 views

Using a NAS as a collective dump, with symlinks for whoever uploaded each file

I have a local machine that was sitting around & doing very little, so I decided to turn it into a NAS (Network Attached Storage) machine, with a 40GB disk for Ubuntu (13.10), a 160GB disk that's ...
k2trf's user avatar
  • 13
1 vote
1 answer
1k views

Using rsync to mirror folders on NAS

I have an old netbook that I use as a torrent server running utorrent on ubuntu and accessing with the webUI, at the moment I add links through the UI and then manually copy the files over to my NAS. ...
Scylax's user avatar
  • 11
1 vote
0 answers
418 views

Why won't cron run my sh script?

Used gnome-schedule to create a script to set my headset as the fallback audio device because it keeps unsetting it when the headset gets disconnected or pc goes into sleep mode. Anyway, crontab is ...
Dmiters's user avatar
  • 238
1 vote
0 answers
109 views

Backup regimen - is this plan any good?

I have a desktop that has some valuable personal and financial records, photos, etc. I installed a second drive formatted ext3 called 'internalbackup'. I've been using a variety of backup programs, ...
Marc's user avatar
  • 9,980
1 vote
1 answer
669 views

Startup script doesn't execute at startup

I have followed the tutorial here that shows how to setup the No-ip update program to start at system startup. I have done exactly as specified here, yet the program still doesn't start. Also, when I ...
jim's user avatar
  • 111
1 vote
0 answers
287 views

Why are alerts still coming if a job is commented out in cron?

In cron entry I have disabled the ignite recovery tape backup. But still we are getting alerts as: The action /opt/osit/omniback/bin/check_make_recovery.pl failed Crontab entry : # Ignite ...
Lakshmi's user avatar
  • 11
1 vote
0 answers
1k views

How to trigger anacron start if USB drive connected

There is a script in /usr/lib/pm-utils/power.d/anacron which restarts anacron if leptops are connected to power. Is it possible to have a similar script restart anacron if (a certain) USB-drive is ...
highsciguy's user avatar

1
3 4
5
6 7
13