Cron is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates.

learn more… | top users | synonyms (2)

1
vote
2answers
37 views

Create a cron job to run redis every 30 minutes if it is not running

I want to create a cron job that will run redis every 30 minutes if it is not already running, but I don't know what I should do. I know that the beginning should look like this */30 * * * */<some ...
0
votes
1answer
11 views

Aws - Ubuntu - Cron job not running

I have a aws ec2 server with ubuntu on it. I did the following to set my cron sudo crontab -e 15,45 * * * * ubuntu /usr/bin/wget -O /dev/null https://mywebsite.com/cron/ But its not running.
0
votes
1answer
13 views

Puppet: Cannot find class cron

I'm using Puppet 3.4.3. I'm trying to use the cron type to manage cron jobs (as documented here: https://docs.puppetlabs.com/references/latest/type.html). However, any time I try and run my ...
0
votes
1answer
14 views

Cron: Execute python script, capture stdout & stderr and send via msmtp [duplicate]

I try this for almost 4 hours now, in different ways. I googled a lot, but nothing I try work as expected. I have a simple .msmtprpc file, that allows me to send mails like this: echo -e "Subject: ...
12
votes
3answers
813 views

Running a cronjob with different parameters each day

I am a programmer, and do not know a lot about crons, but I want to know if this is possible. Lets say I have an array [option1, option2, option3] and a script which I run in NodeJS called script.js. ...
-2
votes
1answer
26 views

Crond is running twice with CentOS [on hold]

I have the following issue that all of my cronjobs are running twice. When I do: ps aux | grep cron I see the following: root 1379 0.0 0.1 117296 1224 ? Ss Aug26 0:00 crond ...
1
vote
3answers
28 views

No log file output (or email with output) running Python script via cron job

I have the following cron job running a Python script which seems to install okay with no issues after creating it in Crontab and saving (this is on a server running Centos7). I'm not seeing either a ...
-4
votes
1answer
26 views

Cron every 5 minutes 8h to 20h [duplicate]

I searched for 15 minutes and to me the syntax still isn't clear... would this: */5 8,9,10,11,12,13,14,15,16,17,18,19,20 * * * run the job every 5 minutes from 8(8am) to 20 (8pm)?
1
vote
3answers
24 views

auto-attach EBS volume to a Spot instance

I need some persistent storage across spot terminations. My approach to solve the problem is Write a startup script that attaches and mounts the persistent volume Snapshot this state and register ...
0
votes
1answer
17 views

Why does crontab store my crontab under /var/spool/cron/crontabs/user instead of /etc/cron.daily

I wanted to create a crontab doing some job for me. Because my server isn't running 24/7 i decided to use anacron instead. Ok, so I took a short look into /etc/anacrontab: 1 5 cron.daily ...
2
votes
1answer
109 views

How do I schedule a recurring reboot in CentOS 6.7?

I've run crontab -e and added this line to crontab to reboot my machine every morning at 1am. 0 1 * * * root /sbin/shutdown -r now When crond runs I see this in my logs Aug 20 01:00:01 stc-logs ...
0
votes
1answer
21 views

shell script to grep within range inside of cron

I'm trying to create a shell script that would look for ERROR inside of /var/log/jbossas/standalone/server.log, such as following: # grep ERROR /var/log/jbossas/standalone/server.log 10:36:37,530 ...
0
votes
0answers
14 views

How to launch cron job after editing crontab

I'm debugging a crontab and I would like to know if it's possible to launch a crontab right after editing. I need to know that the job will work within the cron environment. Now I'm trying to make ...
1
vote
1answer
28 views

running a long cron job - should I break it into smaller processes?

I have a PHP script that accesses the Amazon API at 11:00pm each night. The process takes a few hours. Will this lock up my server (haven't deployed it yet)? Is it best to run this in small batches?
0
votes
1answer
38 views

How to set Cron Job to empty cached directory

I have plain Ubuntu based server, i want to set Cron job and it will empty my website cache directory in every 24 hours, due to massive records 'rm -rf ' not work, so manually i used 'find . -name '' ...
1
vote
1answer
16 views

Python script crashes when run via Cron

I have a python script that completes exactly as expected when run manually as the root user. When I put the script into cron.daily it crashes 100% of the time. The error is a timeout error, but ...
-1
votes
1answer
58 views

Why does crontab run twice while I set once everyday?

I used CentOS for Wordpress web server. I want backup media and SQL once per day, so I edit crontab as below: [john@cent ~]$ crontab -e TZ=Asia/Ho_Chi_Minh 15 3 * * * /bin/sh ...
-1
votes
0answers
14 views

Stop crontab from filling syslog Ubuntu 15.04 [duplicate]

How can I prevent (certain cronjobs) from filling my syslog in Ubuntu 15.04? I have some jobs that run 4 times a minute and quickly fill up my syslog files. I've tried adding: cron.* ...
0
votes
0answers
21 views

php_network_getaddresses: getaddrinfo failed: Name or service not known openshift host

I'm using openshift host for develop a custom php application, all working good in local but I've a problem to establish a connection with my database of openshift. This is the configuration file for ...
1
vote
2answers
84 views

Stop crontab from filling syslog Ubuntu 15.04

How can I prevent (certain cronjobs) from filling my syslog in Ubuntu 15.04? I have some jobs that run 4 times a minute and quickly fill up my syslog files. I've tried adding: cron.* ...
-1
votes
2answers
41 views

Preventing a user from running a script that should only be run by a CRON job?

I have a contact form on my site which uses $HTTP requests instead of reloading on the form submit. It's a really awesome feature, but it also opens up some nasty doors. My contact form sends an ...
3
votes
0answers
48 views

How to apply memory limits to all cron jobs?

On a shared server (Debian Jessie), there are some memory limits (and other limits, like number of processes) that apply for a group of users, configured in /etc/security/limits.conf. It seems that ...
-1
votes
0answers
20 views

Can i run the two cron jobs for two php files each after 2 minutes difference

I have two files in my project.One file is sending the data via post method in second php file.. I want to run both files each 2 minutes difference. first file take the current data at run time and ...
1
vote
1answer
26 views

Logrotate script not uploading to s3

I am trying to use logrotate to upload log files from my rails and nginx commands once a day. When I run the logrotate command manually the files successfully upload, but it never does it on its own. ...
0
votes
0answers
17 views

Why does python 3 script not execute via crontab? [duplicate]

There's one little problem with my crontab and python 3 script. Currently I'm on VDS with Ubuntu 14.04 installed. There're 2 scripts that need to be executed via crontab in desired time. The first ...
0
votes
0answers
15 views

How to setup cron on Ubuntu 14.04 with php5-fpm [duplicate]

I have php5-fpm installed on Ubuntu 14.04 and I would like to create a cronjob to execute a script every 5 minutes.. Using crontab -e I created the following: */5 * * * * /usr/sbin/php5-fpm ...
0
votes
3answers
52 views

List all running cron jobs

Is there a way to see a list of running cron jobs on my server? I would like to see the name of the file being loaded or command. Plus how long it as been running. I am on CentOS.
0
votes
0answers
27 views

crontab not executing even when cron daemon is running [duplicate]

30 1 * * * sh /export/home/omega/report_scripts_cm/parse_subscriber_cdr.sh >> /dev/null 2>&1 30 2 * * * sh /export/home/omega/report_scripts_cm/active_subscribers.sh >> /dev/null 2>&1 30 3 1 ...
0
votes
0answers
11 views

Managing lab machines via cron and dsh

I'm a developer for a research lab. Our lab has 12 Ubuntu machines for test subjects that we control from a workstation using a variety of things (dsh for opening our experiments in chrome, wakeonlan ...
1
vote
1answer
56 views

expect script running screen stops working when run by cron

I hope this question is OK for this forum. I have a device, a modem. I talk to this modem with the linux program "screen" as a terminal program. I invoke it like this "/usr/bin/screen /dev/tty6". I ...
0
votes
0answers
8 views

Anacron - multiple sets of variables

Our environment has an existing set of anacron jobs with the following variables: RANDOM_DELAY=45 START_HOURS_RANGE=3-22 I want to add a new job, preferably in /etc/cron.daily, with a different ...
0
votes
1answer
36 views

cron and lftp issue

I have the following scripts running on raspbian. start #!/bin/bash /root/config/commands 2>&1 > /root/log/$HOSTNAME.log commands #!/bin/bash source /root/config/variables echo TestLine ...
0
votes
1answer
26 views

run cron job only if load not too high

I need to synchronize two systems, so the producers list new entities to be created on the consumer app. It has no realtime need (mostly for datamining, so being a few hours behind isn't an issue), ...
0
votes
3answers
58 views

Multiple servers Rsync into one NAS simultaneaus

Scenario: 1 NAS at our main office (Synology Cubestation CS407) 20 remote servers in various physical retail stores (1 server per store) Network between HQ and stores are in an MPLS/VPN. I have ...
1
vote
1answer
31 views

Solaris “crontab -e” locking via vi

I ran into an issue yesterday with locking on Solaris and crontab editing that has me wondering what the best way to protect multiple concurrent edits of the same crontab are on Solaris. I've ...
0
votes
1answer
35 views

Crontab command not executed

Coming from Why is my crontab not working, and how can I troubleshoot it? i still don`t know why my command is not executed. I got same command for root and www-data and my cron logs shows that ...
1
vote
1answer
61 views

Kerberos master server to slave server automation?

I've set up Kerberos in my workplace running on Centos 6 boxes, and successfully propagated the master server database to the slave and also set up a cron job to update it automatically every 5 ...
0
votes
1answer
37 views

how to use screen with crontab?

I have a screen task running with node (nodemon) I would like to restart nodemon at midinght every day What I do manually is under SSH screen -r myscreen I TYPE "rs" manually I type CTRL+A+D to ...
0
votes
1answer
38 views

How to rotate a log file from crontab?

I have this directive on my crontab: * * * * * /var/www/github/mysite/bin/email email worker await --pid=/var/run/mysite-worker-email.pid >> /tmp/mysite-worker-email.log As you can see all my ...
0
votes
0answers
115 views

Cron Job Crashes the Server?

Can a CURL Cron Job fired every minute crash a server, or it's a problem with the code? I had a shared hosting that worked great, then I added a cron job with enters, using CURL, to a specific URL ...
-1
votes
1answer
34 views

Crontab Certain Days of Week Colliding

I've setup a backup rotation on a centos 6 crontab, one script should run Mon-Sat, the other on a Sunday, never on the 1st of the month. However the weekly (Sunday only) script has been running every ...
0
votes
0answers
20 views

Debian 8.0 - Cron job not working or not called.

I have the following entry I put in after running crontab -e */10 * * * * /var/www/myApp/script/every_10m.sh The script every_10m.sh exists and is executable. Just for testing purposes it has one ...
1
vote
2answers
32 views

How can I send ALL cron output to syslog rather than email

I am running cron with -m off to stop it sending email and then the -s option is supposed to send all output to syslog. Cron cmdline is crond -s -m off My cron job for testing this is * * * * ...
0
votes
1answer
27 views

Magento's cron.php: Persistent or not? Why putting it into cron?

I have a question regarding Magento. Apparently, to perform scheduled tasks within Magento, it needs to run a script called cron.php. Originally the script was triggered by an on-server crontab using ...
-1
votes
4answers
124 views

Check if remote mysql is running

I want a bash shell script that i can run using a cron job to check if mysql on a remote server is running. If it is, then do nothing, other start the server. The cronjob will be checking the remote ...
0
votes
1answer
29 views

Crontabs and SSMTP?

I'm trying to send an email through cron and ssmtp. I created a script with this #!/bin/bash printf "Subject:test\n\Test text" | ssmtp email@adress.com The script works fine when run from the ...
0
votes
0answers
10 views

Setup efficent cron for running a script [duplicate]

I have to run a script which runs every 10 min between these hours everyday 6:50-7:30, 10:50-11:30, 13:50-14:30, 16:50-17:30, 19:50-20:30 What will be efficent crontab with minimum no of lines.
0
votes
0answers
74 views

before to excute a cron job, how to make a delay if there is other cron job running

i have a web application allow the user to add cron jobs to the server, and the user can select the time he wants, and allow them to add more than one cron with a different parameters, when the cron ...
1
vote
2answers
40 views

Why is the cron ENV different from the user's ENV?

On a new Ubuntu install, a user's PATH is: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games But in that same user's cron environment, it is: /usr/bin:/bin ...
0
votes
2answers
135 views

Running a bash script via cronjob to restart a service

First of all. I don't know anything about bash scripting. second this is a very big problem on my side, and I don't have any idea what to do. Currently, I have this website. which was written in php. ...