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.

Filter by
Sorted by
Tagged with
0
votes
0answers
4 views

Can't get cron to output a GUI message / how to make user aware cron is being executed

I need to run, on Ubuntu 18.04, via cron a script, myscript.sh that I want, among other things, to display to the user a message when it is being run so that he is aware that cron is being run (...
1
vote
1answer
21 views

Can't get a cronjob to run a script that installs a service which requires root

I need to run, on Ubuntu 18.04, via cron a script, myscript.sh that contains, among other things, installation instruction for another script, pluckeye-linux-0.99.40.installer and I'm running into a ...
0
votes
0answers
30 views

Add body to a cloud scheduler request using the Python API

I'm extending off of this question: https://stackoverflow.com/questions/60681672/how-to-create-a-job-with-google-cloud-scheduler-python-api I'm wondering how I can insert a body object to be passed ...
1
vote
1answer
24 views

Append to crontab only if entry does not exist

I am looking for a programmatic way to append to crontab only if the entry does not exist. Also, the exit code must be 0 for both cases where the entry does not exist, or the entry exists. I tried: (...
0
votes
2answers
100 views

How to efficently plan 100 jobs via cron?

I am scheduling spiders deployed via scrapy with cron. Each spider one line. Now with 100 spiders this becomes quite difficult to plan and manage. What is the recommended way to manage a large amount ...
0
votes
1answer
35 views

cron not running bash commands

I am using the whenever gem to generate cron commands. I can check these commands with crontab -l. The generated commands are 24 15 * * * /bin/bash -l -c 'cd /Users/Chris/Sites/covid_tracker &&...
0
votes
0answers
11 views

Disable a process while unattended-upgrades installs udpates

we have the unattended-upgrage package installed and it works just fine. We have a high-availability process/daemon runnning on the server which is constantly accessing mysql. Now when mysql is ...
0
votes
1answer
26 views

Recovering lost cronjob rules

I wanted to export my cronjobs to a file. So, I did this. crontab -e > /export/location/file.txt This returned a message: Vim: Warning: Output is not to a terminal and the terminal became ...
0
votes
0answers
15 views

How to change WHMCS Domain Synchronisation Cron Report

I'm getting the following cron report. But my client wants me to make changes so that he could get report that shows number of changes, new accounts, emails sent....etc https://prnt.sc/sbaz50 I'm ...
1
vote
1answer
42 views

When root opens crontab Vim is used although Nano is set as the default editor. Why might this be?

Environment: CentOS 8 Question: When I enter sudo crontab -e it opens in Vim. However Nano is set as the default editor and for every other type of file it is used as expected. Why might this be? ...
0
votes
1answer
34 views

Proxy HTTPS requests internally to the internet

Due to security reasons, one of our hosts HOST-B doesn't have a connection to the internet. But I need to set up HTTPS traffic to healthchecks.io to monitor cron jobs. All incoming traffic is proxied ...
0
votes
1answer
23 views

Suspicious process 'find' running under user nobody

At startup I noticed my machine was under heavy load. Opened up a terminal and top to find a process running the command find under user nobody that was using 90%+ of my memory. I killed it ...
0
votes
0answers
18 views

Need help to fix conditional cron entry

I have a series of entries for my crontab to run a script on specific dates that correspond with our bi-weekly payroll schedule. I am completely clear on the fact that cron does not support year as ...
-1
votes
1answer
25 views

Adding Cron in Linux to execute specific command after a month [closed]

Using CentOS 8 I want to add a cron which shall execute below command after every month sudo certbot renew --non-interactive Can someone please assist how actually I can do it using Linux shell.
0
votes
1answer
28 views

mailx does not run using crontab

I have a script which sends emails. It works perfectly when run manually but I doesn't work when run with crontab: #!/bin/bash cat $HOME/myfolder/mailbody | /bin/mailx -v -s "mymail" -a file.txt xxx....
0
votes
1answer
85 views

Crontab run monthly job at every startup/boot

I have configured a simple reboot server every 15 of month: 0 3 15 * * root /sbin/shutdown -r now So this command on old server work perfect, but in this new server from 03:01 (First reboot) after ...
0
votes
0answers
40 views

lxc-start does not work in a cron script

This script runs fine in the console, but fails to start the container in cron. So, lxc-stop will work fine in cron, but lxc-start won't The cron message I receive is lxc-start ...
0
votes
1answer
23 views

How I can continuously log processes connected to a socket

I have a project with an architecture based on a RabbitMQ queue. Each day at 00:30 triggered by a CRON job, the producer process gets the information from a web page and writes in the queue in order ...
0
votes
1answer
25 views

Using multiple users in crontab script, silently fails when changing users

I'm trying to run a bash script on a centos server. I've running the script as the root user (both for file permissions), but I also need to use the aws service permissions that belong to a service ...
1
vote
1answer
42 views

Get an email notification when my cron fails with non zero exit code - Crontab

I have scheduled a script take_backup.sh in crontab like so 00 19 * * * bash /home/test/take_backup.sh > /home/test/backup.log 2>&1 || mail -s "Backup failed, check attached logs" someone@...
0
votes
1answer
26 views

Get email notification from crontab if the cron doesn't run/return a non zero exit code

I want to use MAILTO to send email notifications only on unsuccessful runs of crons It does not run at all Results in a non zero exit code I have read that email notifications are sent to the ...
1
vote
3answers
49 views

Prevent multiple cron jobs from running concurrently [duplicate]

My server runs a number of cron jobs at midnight. Each job creates a backup of something, by creating a tarball and compressing it with xz. Since xz is a CPU and memory pig, I added a random delay to ...
0
votes
1answer
48 views

Curl doesn't work when run with crontab [duplicate]

This is my curl script #!/bin/bash PING_STATUS="$(netcat -vz mc.bella.wtf 25565 2>&1)" curl -H "Content-Type: application/json" -X POST -d '{"embeds": [{"title": "Server Status:","color": ...
0
votes
0answers
41 views

rsync failed to set permissions: operation not permitted

I am trying to replicate my domains group policy from my primary domain controller to my secondary domain controller. When I run the below command which I used from techmint https://www.tecmint.com/...
0
votes
0answers
25 views

@reboot not working in cron - tinycore linux

My crontab entry @reboot python3 guest.py & I checked that this runs on terminal. But on reboot after i grep for python or guest.py i can't find the process. I think @reboot does'nt work for ...
0
votes
2answers
65 views

cronjob every 4 weeks, will not executed

i using cron on my ubuntu headless server 18.04 and the following cron, will not executed: 30 13 * * 6 test $((10#$(date +%W)%4)) -eq 1 && /bin/bash /backup/test.sh i tested the command on ...
0
votes
1answer
52 views

Why didn't crontab didn't run automatically to backup database with Barman?

Operate user: barman If run these 2 commands, it can work: /usr/bin/barman cron /usr/bin/barman backup pg Set them to crontab: crontab -e * * * * * /usr/bin/barman cron 0 4 * * * /usr/bin/barman ...
-1
votes
1answer
29 views

Running a job every 10 seconds while the other runs every 1 minute

I have one job that's supposed to run every 10 seconds, and then I have another one that's supposed to run every 60 seconds. However, it seems that the one that's supposed to run every 10 seconds only ...
0
votes
0answers
20 views

Gmail relay prevents me from sending cron mails to local machine

I configured postfix on my Ubuntu 18.04 web server to use my gmail account as an smtp relay to be able to send out email. My postfix main.cf looks like this: # See /usr/share/postfix/main.cf.dist ...
0
votes
0answers
82 views

Docker in CentOS and cron issue

I am using the docker version : 1.10 in Centos version : CentOS Linux release 7.4.1708 (Core) and tried the following steps in Dockerfile FROM centos:7 RUN yum -y update RUN yum -y install ...
0
votes
1answer
74 views

Cron task in a remote server [duplicate]

I try to learn how to create crontabs in a remote server. I try to run a script every 5 minutes. I use a server in the company "IONOS" and it is in Europe. I have a Mac. I open the Terminal. # I ...
0
votes
1answer
25 views

do I keep all files / setting when switching machine types on google compute engine?

I am running cronjob every 30 minutes - each cron job takes 2.5 hours to complete. I recently noticed "overutilized instance" message for virtual instance in gce with a recommendation to swith to ...
0
votes
1answer
20 views

How can I change the sender's name for email messages sent by cron

We have several nearly identical servers with a fairly classic server-NN naming convention, each running cron jobs that we like to monitor via email. There are is a group of users, who receive the ...
0
votes
1answer
57 views

CentOS 7 sending e-mail crons while sendmail is not installed

Background I have configured my crontab to send me emails that way MAILTO=myemail@company.com ... And I am receiving the e-mail in myemail@company.com's inbox through the company SMTP server ...
0
votes
1answer
45 views

crontab not working for deleting a old files from log folder

I have this line in my crontab to delete old files: 1 * * * * find /var/log/abc/ -mtime +7 -type f -delete Unfortunately, it does not work. I have attempted to give all users permission to clear ...
0
votes
1answer
39 views

Does running cron by itself have the same behavior as via the init.d script?

I'm working with some code that fires up cron on a server (which doesn't have it running at boot time). The script which starts cron sets up some logging stuff and then simply invokes cron. It doesn't ...
0
votes
1answer
17 views

Cron 4 Minutes inaccurate Debian Buster

I use Cron to update an hourly report. I give the following time value: 0 * * * * But the report is always 4 Minutes too early Checking the System time is correct and in sync with NTP. Any ideas?
0
votes
0answers
17 views

Find/Mv not executed with cron, works fine executed from console

My script to parse xmltv epg data: #! /bin bash /bin/rm -f /home/hts/webgrab/multiple/out/*.xml /home/hts/webgrab/multiple/1/run....
0
votes
1answer
57 views

openSUSE: “Permission denied” error on Cron log file

using: openSUSE Leap 42.2 /etc/cron.d/mysite file content: * * * * * wwwrun /usr/bin/php /srv/www/mysite/cron.php >> /var/log/apache2/mysite.cron 2>&1 /etc/cron.d/ dir content: /etc/...
0
votes
1answer
59 views

Cron Job for deleting daily apache Log

on my Ubuntu cloud server often happens when i visit apache log fiiles to be 5-10 GB in a day or two, i'm a user of vestaCP and destination of log files is: var/log/apache/domains/domain.error.log and ...
1
vote
0answers
69 views

I cannot edit my crontab in Ubuntu after saving the file

Edited Why would the below command cause crontab -e to show permission denied errors? /bin/sh /var/www/ers-api-proxy/backup.sh 1> /var/www/ers-api-proxy/log.txt 2> /var/www/ers-api-proxy/err....
0
votes
0answers
53 views

symfony 3.4 console command in docker env vars in crontab

I have a symfony 3.4 command to run with crontab in a aws ECS docker container. I've tried everything but seems that symfony is not reading env vars at all if runned in crontab. My crontab test is the ...
0
votes
1answer
85 views

Crontab -e with Debian Buster not working [duplicate]

I want to run a cron every 5 minutes on Debian Buster. My steps: crontab -e */5 * * * * /usr/local/bin/squid-analyzer > /dev/null 2>&1 sudo service cron reload Unfortunately this entry ...
0
votes
0answers
20 views

How to create a cron job into webmin to work exactly like the command wget in cpanel

I want to get work a cron job into webmin like this cron job that i have working in somewhere cpanel server which is: wget https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/transactions > /dev/null 2>&...
0
votes
3answers
107 views

Checking if a process was spawned by cron

I'm trying to setup a script that shutdown a VM if no cron jobs are running. There will also be another script that starts the VM an hour before the next scheduled cron job. To do this, the best ...
0
votes
1answer
40 views

Why would this script not start the apache webserver?

I use this script to restart the apache2 web server since the letsencrypt ssl renew process does not restart it once it has finished its actions. When i test it manually by stoping the server and ...
0
votes
0answers
10 views

Using crontab to set wifi schdule on OpenWRT [duplicate]

I'm new in here so my apoligize if i'm posting redundant questions but I wasn't able to find out in the blog so far. I'm having some issues using cron to set a schedule on my opewrt router. Here is ...
0
votes
1answer
45 views

Cron job to detect when system power is lost returning invalid timings

We are having issues with our electrics, so I wrote a simple bash script to try to log when the events were happening. I've created a cron job that runs every minute to run the script. The idea of ...
0
votes
0answers
26 views

CentOS7: For a particular cronjob entry, it runs but does not log to /var/log/cron [duplicate]

We operate the server of the following environment. $ cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core) $ uname -r 3.10.0-1062.9.1.el7.x86_64 $ rpm -q cronie cronie-1.4.11-23.el7.x86_64 $ ...
0
votes
0answers
49 views

tar | pigz dies if run under cron

I run a kind of backup script using tar joint with pigz for compression. The problem is that tar -zcf /file.tar.gz /folder runs under cron. While tar -I pigz -cvf /file.tar.gz /folder nor tar ...

1
2 3 4 5
36