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

(CRON) info (No MTA installed, discarding output)j though there is no cron job is scheduled

In my /var/log/syslog file I can see the above log is entered in every minute. Though I have checked my crontab and found nothing configured there to run. My /var/log/syslog is as follows: And the ...
1
vote
1answer
21 views

OSX mojave: “crontab: tmp/tmp.X: Operation not permitted”

After updating my OSX to Mojave, it seems I am no longer able to edit my crontab. Any attempt to do so results in the error message on the title of this question. I tracked crontab to /private/var/at ...
0
votes
0answers
12 views

Need help killing psuedo terminals

I have a ubuntu web server that uses a chron job to connected to a third party sftp, pull a file and disconnect. This was working for a few weeks and has stopped. I tried to manually SSH into the ...
0
votes
1answer
23 views

Cronjob for Upstart service not working

I have an Upstart init script that manages a python script on the server. The pre-start and pre-stop scripts append a timestamped entry into a log file. There is a cronjob to stop and start the ...
0
votes
0answers
16 views

Set up email server for cron job

So I've been running a cron job on a daily basis and I set it up with the MAILTO variable so that I receive an email with the error output if the command ever fails. It was working fine up until today,...
-1
votes
1answer
26 views

Mogrify commands within crontab while ensuring files aren't processed twice

I have an image folder that serves content, it contains jpeg, jpg and gif files. More files are added automatically all the time. What I intend on doing is adding the following commands to crontab (...
0
votes
0answers
14 views

How to Fix Failed while decoding JSON: Can't connect to www.example.com:443 error?

Changed domain name and also changed cron values with new domain name. But when trying to transfer files from one server to another, the cron on targeted server doesn't run. This is CentOS 7 with ...
0
votes
1answer
30 views

Samhain - Monitor /var/spool/cron/crontabs/

Using Samhain File Integrity Monitoring, I'm trying to monitor changes to the crontab entries. I added the below entry to /etc/samhain/samhainrc dir=/var/spool/cron/crontabs then I added an entry ...
0
votes
0answers
28 views

Biweekly expression for cron

Do you have an example of the cron for a biweekly subscription? I am trying to run every other Friday at 17:00 of every month. Thank you,
0
votes
1answer
41 views

Crontab timings confusion

Can somebody please eplain why a weekly cron job I'd assumed would run at 06:47 on Sunday morning in fact ran at 00:10 on Tuesday morning? This is a fairly virgin Debian Stretch box (been up a while ...
1
vote
1answer
30 views

Sendmail bash script invoked by cron can't read from stdin

I try to write a little script that overwrites from adress of nullmailer. Nullmailer has an option "allmailfrom" you can put a mail adress into /etc/nullmailer/allmailfrom and all mails sent have this ...
-1
votes
0answers
11 views

Centos7, Minecraft server (java edition), crontab at reboot and unexpected stops [duplicate]

I researched many topics about minecraft server crontab and I tried to do it on many ways but every attempt has same result. My crontab looks like: @reboot screen -dm -S mc /path/to/run.sh I tried ...
0
votes
0answers
17 views

How to configure Postfix in Debian 9 to send emails using verified email address in AWS Simple Email Service?

Let us say I have verified an email address webserver@example.com is AWS SES for use. When the backup scripts that are run with cron fail to execute successfully I want the Postfix mail server on ...
1
vote
2answers
39 views

Prevent CRON jobs from running on Standby AIX server

We have an Active/Standby pair of AIX 5.3 Unix servers. Business requirement dictates keeping a list of components synchronized between them e.g. Oracle RDBMS using Data Guard and certain OS file &...
1
vote
0answers
18 views

PhP Session Destruction not as eXpected

I have added this code to the top of my page and it is executed when a user login. <?php $lifetime=86400;session_start();setcookie(session_name(),session_id(),time()+$lifetime,"/","","TRUE","...
1
vote
1answer
28 views

OpenShift: Cronjob is executed in wrong timezone despite master configuration is correct

I have a configured a cronjob in OpenShift. Its crontab entry looks like this: spec: schedule: "0 3 * * 1-5" jobTemplate: So it should run at 03:00 in the morning on weekdays. All cluster nodes ...
0
votes
1answer
55 views

Cron job to delete all files older than 7 days with extension in a specific folder - not working

I have a cron job that runs at midnight to delete all .txt files in a folder that are older than 7 days. I can see the job is running, but the files still exist in the folder. I'm new to cron, so I'd ...
0
votes
0answers
28 views

Anacron daily job is not running in ubuntu 16.04

I have the following script that I'm trying to run daily: $ cat /etc/cron.daily/my_backup_script #!/bin/sh pg_dump -h x.x.x.x -U myuser -d mydb -f /home/ubuntu/my_backup_dir/$(date '+%Y-%m-%dT%H-%M-%...
9
votes
4answers
1k views

Execute command when a file changes

I have a scenario where I am uploading .csv files to a specific folder, /tmp/data_upload, every day, and the old files are replaced by the new one. I need to run a Python script once the data is ...
0
votes
1answer
20 views

Wrapper to send command output via email (like cron)

I'm looking for a wrapper command (ideally in Python) which executes a given command and handles its output (STDERR/STDOUT) similar to cron: if there was no output (and return code 0), do nothing ...
0
votes
1answer
51 views

cron recently ignores changes to /etc/crontab

Cron recently started to ignore any changes to /etc/crontab. Cron's mail works for the older entries. Restarting cron with sudo systemctl restart cron has no effect. I did not install new packages ...
1
vote
1answer
96 views

What is the best way to run cronjob in AWS ECS?

I have a web app powered by Laravel that is set up on AWS ECS. I would need to run an artisan command as a cronjob. I'm looking at "Scheduled Tasks" in ECS Cluster configuration. I can launch new ...
0
votes
1answer
63 views

Trying to set up cron job

I want to run cron job every night at 1am and after that every 3 hours from morning 10am-6pm only. 0 1,10-18/3 * * * Is this the correct format?
1
vote
2answers
66 views

Send email if script outputs string

I found this line: sh script.sh | grep 'NO' 2>&1 > grep.log && /usr/bin/mail -s "grep found something" m@mail.com < grep.log which will write the output of script.sh to grep.log ...
0
votes
0answers
84 views

Cron PHP sessionclean hangs invoking oom-killer

This morning one of our Linodes (18.04.1 LTS (GNU/Linux 4.18.16-x86_64-linode118 x86_64)) crashed. From the syslog I can see that cron task PHP cleansession got stuck around 36 hours ago: Dec 15 23:...
1
vote
0answers
13 views

AWS MySQL backup cron not running [duplicate]

I have this cron: 00 0 * * * root /home/bitnami/backup.sh > /home/bitnami/backup.log The Backup script contains: #!/bin/bash cd /tmp file=$(date +%Y-%m-%d).sql mysqldump \ --host localhost \ ...
2
votes
1answer
77 views

How to setup a cron job every random weekday?

As the question is fairly self-explanatory, I would like to know how to set a cronjob to execute any random weekday without using any external script. EDIT: In case people have not understood this ...
0
votes
1answer
20 views

Incrond | Use $HOSTNAME environmental variable

I'm using Incrond to check a folder for file changes which triggers a Rsync job to our storage server. This configuration is deployed through Puppet, and therefore would like to use the $HOSTNAME ...
2
votes
1answer
64 views

How can I stop a systemd service with cron?

I have a simple crontab entry that is supposed to stop a service, yet it does not work. * * * * * systemctl stop nginx I even tried: * * * * * /bin/systemctl stop nginx Since that't the location ...
0
votes
2answers
62 views

How does yum-cron send emails from localhost?

I have an amazon linux 2 server running in the aws cloud and I have yum-cron running on it. I have an email domain mydomain.com which is running on a separate server in a completely different cloud ...
1
vote
0answers
26 views

Multi VPS: Best practice for semi-automated upgrades?

I've got many virtual private servers, each needing some apt-get upgrade -y lovin' from time to time. (Ubuntu 18.04) Problems I face: I don't have time to upgrade each one manually. I don't want to ...
0
votes
1answer
55 views

/var/log/cron.log returning CRON[PID]: Permission denied for domain joined account

I'm trying to get a cron job to run, but not as root. Within the context of the user (domainuser@contoso.com), here are the outputs of the crontab and cron.log: Output of crontab -l # Edit this ...
-1
votes
1answer
21 views

crond service running after removing the entry in crontab

I removed the entries in crontab for root and still, I can see the scripts running tail -f /var/log/cron. How can I remove those entries. Output of cron log: CROND[2736]: (root) CMD (/home/centos/...
0
votes
1answer
51 views

Configuring Linux server for long term use (no remote access granted after deployment)

Not sure if the title is the best but to explain a bit more: I have to deploy a Linux box on a customer network that I will not have remote or regular access to. I want to ensure that the system ...
1
vote
0answers
13 views

Crontab not working for pageres, showing error MTA installed, discarding output [duplicate]

my ubuntu machine has pagers for taking screenshots, it is working when I run manually root@bobby:~# pageres https://example.com 480x320 --format=jpg --filename 'page' --overwrite But, when I enable ...
1
vote
1answer
77 views

Crontab influences bash script if condition?

I am a bit baffled here, and not really sure how to debug this. I have a self-written bash script, that checks if a samba share is active, and if not, sends me an email. Script is in /root/SKRIPTS/, ...
-1
votes
2answers
978 views

BASH-create a 'www-data' crontab that runs a PHP file

I need to get this to run in a cron file in /etc/cron.d/: */15 * * * * php -f /var/www/nextcloud/cron.php ...but, my scripts don't run. It's permissions are set to 644 and I need to create it with a ...
-2
votes
1answer
43 views

how to make crontab that work effective? [duplicate]

and I am newbie for linux, I am sorry if this question is so dumb. I would like to know to create crontab properly, I create job as below: * * * * * /usr/src/debug/http/cron_job.sh >/dev/null 2>...
-1
votes
2answers
31 views

How to remove zip files in specific folder in my hosting by cron job?

How to remove zip files in specific folder in my hosting by cron job? I want to remove zip files in specific folder every day at 5:00PM Please help.
0
votes
1answer
66 views

Starting java program and screen with cron at boot [duplicate]

I am trying to run a java program inside a screen session at boot, I am using the following cron, but after reboot screen -ls shows no active screen sessions. @reboot /usr/bin/screen -dmS myservice "...
2
votes
1answer
44 views

Ec2 Cronjobs - High CPU usage

I have an EC2 Instance (micro) running a cakephp API. This instance serves quality validation before deploying into production. On this instance, we have 5 cronjobs that run once each minute. Those ...
1
vote
0answers
161 views

Running 'cron -f' as an unpriviledged user in docker: /var/run/crond.pid: Permission denied

I want to create a docker container with a node application which runs on a schedule. I'm attempting to have cron running in the foreground in the container and periodically start the application. ...
0
votes
1answer
64 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
2answers
38 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
31 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
2answers
376 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 ...
1
vote
1answer
161 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
2answers
39 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
408 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
166 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