Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cron]

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.

0
votes
1answer
33 views

Auto backup and delete a project directory using cronjob

I am trying to backup a directory, location: /mnt/project/ once in 24 hrs, and another directory inside the parent directory, location: /mnt/project/uploadDocuments/ every 3 hours using cronjob. ...
0
votes
0answers
23 views

Centos 6: How to run Init Script via crontab @reboot on server boot [on hold]

I have Youtrack installed on a Centos 6 and would like to make it start after machine has fully booted. Instead of chkconfig or rc.local, i'd rather prefer to boot via crontab with @reboot. Since it ...
0
votes
2answers
18 views

How to trace cron actions?

I know that there are some cron jobs (run every minute) scheduled in my Ubuntu. How do I track what's running them, when the cron files (sudo su; crontab -e) are empty?
-1
votes
1answer
28 views

cronjob emails look outdated

I had some cronjobs that were running 120 times per hour. 5 were scheduled to run every 5 minutes and 1 was scheduled to run every 1 minute. They sent emails to my gmail account so I could debug the ...
0
votes
0answers
13 views

Cronjob to Flush Swap [duplicate]

I am trying to create a cronjob that will flush my swap every 30 minutes. I've tried the following: Attempt #1: SHELL="/bin/bash" */30 * * * * (swapoff -a && swapon -a 2>&1 | mail -s "...
0
votes
2answers
80 views

In Kubernetes, how can a container created from a CronJob find out when it was scheduled?

We have a Kubernetes CronJob resource that runs a Job every minute. I need the container that results from the Job to know when it was scheduled to run. Is this possible? Background info just in case ...
0
votes
1answer
20 views

Where Is Laravel Forge Scheduler In The Server?

A scheduler is set through Forge but running crontab -e in the server (Ubuntu 16.04) outputs no crontab for forge - using an empty one and then opens an empty default file. Where is it being set? The ...
0
votes
0answers
31 views

Curl cronjob for a file does not run

I have a dedicated server (SSH access) and one of my clients says that it's been a couple of days that one of his cronjobs do not work. This is the command he's using: * * * * * /usr/bin/...
0
votes
2answers
29 views

Cron hourly after boot time

Is there anyway to execute cron hourly after boot time and not at a specific time every hour? I am working with CentOS6 and CentOS 7 machines. E.G.: When my computer boots at 00:42 I want it to be ...
0
votes
1answer
64 views

commands not running from crontab [duplicate]

I have setup and cron to check if a port is busy or free and if its free then it sends and email and then start golang api service send mail is working properly but api server is not getting started ...
-2
votes
1answer
31 views

Random Sleep in Crontab/Terminal [duplicate]

I want in terminal or in crontab(both) be able to put a random time. Something like Sleep $(1-300) pkill screen && ./start just a random simple example
0
votes
1answer
51 views

how do /var/spool/(clientmqueue,mqueue,mail) work?

If - for example - cron jobs output to stdout, which is the process collecting the output and writing to these directories ? /var/spool/clientmqueue /var/spool/mqueue /var/spool/mail Where ...
1
vote
1answer
41 views

Find the source of a *nix process?

I have a dev and QA web server running on the same EC2. I've created a shell script (which is called via Cron) to check to see if a process is running and if not, restart it. Shell script: #!/bin/...
0
votes
2answers
860 views

Cron.hourly runs 17 min past the hour

I added a file to my cron.hourly folder. It runs every hour but it runs 17 min past the hour. So instead of running at 5:00, it runs at 5:17. How can I change the cron.hourly or reset it to exact ...
1
vote
1answer
48 views

Log rotation not happening with cron job- files are symlinked and forceful log rotation works

I am facing issue with logrotation with 2 of my custom files. The folder where they reside - /var/log/test is symlinked to /sample/var/log/test cron.daily log which picks up logrotate: Sep 12 03:20:...
0
votes
2answers
52 views

If run as a cronjob my shell script doesn't launch a screen

Please have a look at the following simple shell script startCleanup.sh: #!/bin/sh screen -d -m -S cleaner /usr/bin/python3 /opt/cleanup.py My crontab looks like this: * * * * * /opt/startCleanup....
0
votes
0answers
20 views

Mysql Unable to connect to the database - time to time

We have problem to run php script via crontab. There are around 70 lines that run scripts installed in different virtual servers. When few lines are executed everything is working but when we have ...
0
votes
1answer
37 views

I receive cron email every 20 minutes but don't find the cron

After I installed ssmtp I started receving the following emails: Cron <smmsp@vps123456> test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp I looked at /etc/crontab ...
0
votes
0answers
87 views

Issues with PAM and CRON

On domain joined ubuntu 16.04, I would like to restrict users to AD groups, so I have the following lines additionally in my /etc/pam.d/common-auth (before the default ones, via /usr/share/pam-configs/...
0
votes
0answers
68 views

CRON messages being delayed for arbitrary long time in syslog

I found in a few servers's syslog that some of the CRON related messages are written in a wrong time, like the following: Aug 21 06:26:01 hty-controller CRON[30159]: (root) CMD ( python /.../...
0
votes
1answer
191 views

Host Key verification failed SSH Rsync

Two days ago I started using SSH to transfer backups of two Linux servers to another one. I created a shell script to run it in Crontab. Both servers are using Ubuntu 14.04.5 LTS My SQL-Server ...
0
votes
1answer
103 views

Why does rsync+cron fail with opendir permission denied?

I am trying to make a nightly offsite backup using rsync. There is a folder /media/raid1/backup that is to be uploaded to a different server every night using a cron job running as the user ...
0
votes
1answer
27 views

Send mail via cronjob/php, RHEL

I am trying to send an e-mail by a cronjob using a php script. The script itself works fine when executed in a shell. When it is run by cron, the attachment is missing. OS is RHEL 7 Cron entry : 30 ...
0
votes
2answers
180 views

Nginx certbot cronjob not working

I have installed certbot with the nginx module. Today I noticed that the cron that is installed automatically did not work. The cronjob in question is /etc/cron.d/certbot and the content was 0 */12 ...
0
votes
0answers
213 views

Ubuntu 18.04 cron.hourly script not running

I have a script in /etc/cron.hourly that I want to run. The script is something like this: #!/bin/sh -e echo "Doing something" eval $(do_something) exec >> /tmp/log 2>&1 and $ ls /etc/...
0
votes
0answers
38 views

How to setup multiple schedules with cron.yaml

I am working with AWS Elastic beanstalk and have my worker server running and loading job successfully. However I have a cron job that I am wanting to run at multiple hours of the same day but I am ...
0
votes
1answer
28 views

reverse ssh using systemd-cron is not connecting [closed]

I have a script that checks my home rpi2 for a file using ssh, pk auth, if the file exists it deletes it (again ssh pk auth) and opens a reverse ssh with: ssh -fN -R xxxx:localhost:22 user@...
0
votes
0answers
16 views

Crontab is not working in centos 7 [duplicate]

I am trying to setup crontab in my centos 7. I have /etc/crontab file is like below. SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root */5 * * * * root /php /root/Downloads/chat/pass.php ...
0
votes
1answer
25 views

Cron stopped working after I added another job

I hope you're doing well. I am facing a big problem with my cron jobs. Up until today I had two cron jobs to be run in my crontab to be ran at specific times of the day. Everything ran flawlessly ...
0
votes
1answer
78 views

Is the process of the cron job finished when the script it calls is executed or just when it is finished?

I am using cron to run a php script every minute and I want to lock it so it won't overlap. So my question is, if I lock the cron job with flock, will lock the process of the cron or of the php-script?...
0
votes
0answers
11 views

How to add Blesta cron to plesk [duplicate]

I've tried to add these command but non of them works. /usr/bin/php -q /var/www/vhosts/***.com/blesta_location/index.php cron /usr/local/php -q /var/www/vhosts/***.com/blesta_location/index.php cron /...
0
votes
1answer
34 views

debian cron.hourly script not executing

New to cron on debian 9 , I have a file called ipupdate in /etc/cron.hourly/ipupdate -rwxr-xr-x 1 root root 132 Jul 11 18:21 ipupdate the file has a single curl command like this: curl "https://..."...
0
votes
1answer
28 views

Cron output emails created with delay

One of our users has a daily cron job which runs for 24 hours. The output is emailed to the user in the usual way. Because the output is piped into sendmail (postfix) over 24 hours, it appears in the ...
0
votes
1answer
74 views

systemd cannot restart service file

I have written a bash script which I want to run every 60s (don't worry, I have tried the Script out, it runs perfectly). Now I wanted to implement it in systemd .service file, but so far it doesn't ...
0
votes
0answers
196 views

Katalon Studio Console Mode fails when started by cron on Linux

I'm using Katalon Studio (https://www.katalon.com/) in Console Mode (https://docs.katalon.com/pages/viewpage.action?pageId=13697253) on Linux (Red Hat Enterprise Linux 7.4) to automate web tests. I'...
0
votes
2answers
103 views

pg_dump fails as a cron job in one script but not another

I have two cron jobs on my AWS server (triggered via crontab -e) to invoke pg_dump on specific databases. The two scripts are identical with the exception of the target database they're backing up ($...
-2
votes
1answer
194 views

Cron logs aren't present in /var/log/syslog [closed]

I have a cron task with "printf": #!/bin/bash # .......... printf "hello\n" # .......... It runs once in N hours. However, in /var/log/syslog I don't see any logs with "hello" at all. Why not?
0
votes
1answer
51 views

Azure Azcopy - cron jobs

We have Azure Azcopy configured on Ubuntu Server (16.04). The ini file we have created pulls data from a cloud storage account to the local Ubuntu system within Azure. When we run it manually, there ...
-3
votes
2answers
166 views

How to manager Cronjobs via web gui? I need only a library [closed]

For my web app I need to be able to run some Cron jobs and edit them and their frequency via web interface. I already have a web app and I want to embed this functionality in it. I don't want a ...
0
votes
0answers
93 views

Get open windows from window manager from cron job (root)

I need to get the list of open windows. My script is running as root (cronjob). Command: wmctrl -l Problem: it doesn't see any open windows if I start it as cronjob. How to fix? I'd like to get all ...
0
votes
1answer
129 views

CentOS - Duplicate yum-cron-hourly processes

yum-cron-hourly.conf is run hourly, the default, and I'm not sure its working correctly. There are multiple procs running. root 17320 17306 0 16:01 ? 00:00:00 /usr/bin/python -tt /usr/sbin/yum-...
0
votes
1answer
128 views

Multiple cgroup in service cron status: what does it mean?

I'm trying to diagnose some funky behaviour with cron on one of our Ubuntu 16.04 LTS server. When I do service cron status I get this: root@baobaospa:/etc/cron.d# service cron status ● cron.service -...
0
votes
1answer
73 views

500 error for PHP script with cron, but not CLI

I have a PHP script which I am trying to run via cron. In cron I have php /home/dir/dir/foo.php When the command runs, the cron log says: Status: 500 Internal Server Error X-Powered-By: ...
0
votes
1answer
31 views

The cron job defines by the user not running

How to run a command defined by a user user1 on a crontab in ubuntu server? There is no root access in the server but the user user1 have all the root permissions. A cron tab needs to run every ...
1
vote
0answers
15 views

Gentoo running unknown scheduler

I inherited management of a Gentoo based server (Gentoo Base System release 2.3, 4.4.26-gentoo) that is invoking a number of php scripts each night but I can't figure out how. I don't see them ...
1
vote
2answers
87 views

Cron doesn't write in log instantly on Ubuntu

I execute a Python script through cron. The script is containing many print statements from its beginning (first line is a print). However even if the script is running, the log file is created but ...
0
votes
0answers
74 views

Redhat repository server packages auto check and update

I have Redhat repository server in my network. Now just realized that my repo packages are not up to date and security updates are old too. Is there any way to download latest packages/version to ...
0
votes
1answer
971 views

Running cron every 24 hours and start immediately

I want to run some script of python every 24 hours, at every 23:59:58 i want to kill the the job. I want to run python immediately. Thus I use this syntax bellow * */24 * * * cd /ftp/ftp1 && ...
0
votes
0answers
57 views

Managing log file size via cron

I have a tomcat server running on my ec2 instance. Recently, my catalina.out log file got pretty huge to the point it was quickly filling up and causing memory overflow on the server. I have it more ...
0
votes
0answers
88 views

Cron Job not starting and did everything to the point

I know this question has been asked many times before in this page but I am still stuck. I am using a DigitalOcean droplet to run a website whose main function is to send multiple emails a day to ...