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
1answer
12 views

Prevent failed / interrupted cronjob from retrying

I have a cronjob (on a CentOS server) which looks like this: 20 3 * * * wget -qO- "http://example.com/mycronfile.php?parama=1&paramb=2&paramc=3" > /dev/null 2>&1 The PHP ...
0
votes
0answers
21 views

Alock is not launched when specified in crontab

I have the following problem: I am going to run a TV dashboard basing on Ubuntu 20.04 LTS focal with transparent screensaver and with locking feature enabled. In my configuration, I used activated ...
0
votes
0answers
27 views

Cron job to create and send backups over FTP

My VPS is running on Centos 7 with nginx and MySQL 8.0 I have created 2 cron jobs to backup my files and database everyday at a specific time. everything works fine but I'm trying to send those backup ...
0
votes
1answer
39 views

While a process is running manually, it stops after a while in the cron job [duplicate]

I have a PHP script and this script loops thousands of lines. When I run the PHP file manually, this loop of thousands of lines returns successfully. But when a cron job does this, it turns around 143 ...
0
votes
0answers
44 views

Cronjob execution based on different timezone (Ubuntu 18.04)

OS: Ubuntu 18.04 Cron: cron/bionic,now 3.0pl1-128.1ubuntu1 amd64 System timezone is: America/Los_Angeles (PST) I want to set timezone of an EXECUTION TIME (not the timezone for the script) for ...
0
votes
2answers
74 views

cron is not restarting pm2 [duplicate]

I've tried many things but cron just won't restart pm2. I set the crontab -e with: SHELL=/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin */10 * * * * /usr/bin/node /usr/bin/pm2 restart all And the I ...
0
votes
1answer
24 views

Do anacron jobs accumulate?

Let's say you set a script to run every week using anacron job, then you keep the machine turned off for "N" weeks. My question is: will the script run "N" times when you turn it ...
0
votes
1answer
11 views

Cron to find multiple file types and automatically delete them

I am trying to put together a command that will find multiple file types and automatically delete them. I want to run this in a cron every 10 minutes on my server. I would like to find files of type: ....
0
votes
0answers
44 views

Start MySql if it's not active

I have some problem, don't know why every day about 06:08-06:24 my mysql just stops: 2021-03-29T06:24:22.398643Z 0 [Note] Giving 0 client threads a chance to die gracefully 2021-03-29T06:24:22.398662Z ...
0
votes
2answers
19 views

Running newusers util in cron to batch create users does not run [duplicate]

I'm attempting to batch create some users from a file using the newusers util on ubuntu 18. When running in cron as the root user, nothing happens. When I run the command manually, it works as ...
1
vote
1answer
58 views

CRONTAB - Summer/Winder Time-Change

Since there can be problems with the time change from summer/winter or winter/summer, I wanted to ask how I could solve the problem within the bash script-2? I think in the winter time it should not ...
0
votes
0answers
116 views

Systemd timer OnCalendar every minute ending with 5

With OnCalendar systemd timer i can create something like this to run every 5 minutes. OnCalendar=*:0/5 Is it possible to run it at every minute ending at 5 (00:05, 00:15, 00:25...) only? And/or at ...
-2
votes
1answer
53 views

Sending Mail with Crontab [duplicate]

I have problem with sending mail in Crontab #!/bin/sh log_direc="/var/log/snort/alert" email="vodeni1953@heroulo.com" echo "TESST" | sendmail $email < output.txt` It ...
0
votes
0answers
10 views

What is a good way to keep multiple directories' contents synced with releases from a GitHub repo?

I work for a company that maintains lots of custom WordPress plugins and themes for our network of myriad WordPress sites. The repo managers have it set up so that webhooks are added to the repos and ...
0
votes
1answer
33 views

A (cron) job to run if file has changed

I need to backup a live sqlite db by running a command once a day. Only if the db file has changed since last backup. How could it be achieved on Centos 8 ?
0
votes
0answers
25 views

How do I color/format logs and also rotate without one action getting in the way of each other?

I have the following: A shell script which gets executed via screen and a screenlog gets generated using the flag -L. This shell script is just ncat (better version of netcat) listening on a specific ...
0
votes
0answers
15 views

How to run a bash script from cron without being a root? [duplicate]

I'm using redhat 7. My user is not a root user, and the root user can't run the commands in the bash script file. I added the command that runs the script in crontab -e but it doesn't run. However if ...
1
vote
0answers
38 views

Generate systemd task on the fly

I'm writing a script to backup each mysql databases separately on from a mysql server, but instead of handling this inside the script I would like to rely on systemd to generate a backup job to get ...
0
votes
0answers
31 views

How to determine which resource is exhausted

On a server with a very high load many of my daily cron jobs stopped working. I have postfix server running that only delivers locally so that I can see the output of the cron jobs with mutt. I ...
0
votes
0answers
373 views

Copy files from city web cam to WordPress site

Have a user that would like to copy city webcam images showing day by day construction of their building, then house those copied images on their WordPress site. The URL is always the same http://www....
0
votes
0answers
19 views

Using cron to automate backing up server with rsync doesn't work [duplicate]

I have a linux server hosting Minecraft that I can connect to using ssh, I should probably also mention that I do have an ssh key with no passphrase. I want to backup my Minecraft world every hour to ...
0
votes
1answer
40 views

Is there a way to handle host restart for CRON task if the restart frequency is extremely low about once-twice per year?

As mentioned in another question here: Job scheduling using crontab, what will happen when computer is shutdown during that time? that Cron jobs will not work during shutdown/restart case and we can ...
1
vote
1answer
43 views

Logrotate Says It Rotated Logs, But Didn't

OK, here's my situation. I'm trying to use logrotate to rotate VNC logs for a specific user on an hourly basis. Based on the feedback I get when I run the utility, the log rotation goes off, but ...
0
votes
0answers
88 views

Cron running Cerbot every minute

I have a peculiar problem. For some reason as the clock struck midnight on February 1st, cron is now running certbot every minute trying to renew a certificate. When running sudo crontab -l I get the ...
1
vote
0answers
420 views

starting cron service fails with code=exited, status=203/EXEC

I just noticed that my server's cron service is not running. I only have 1 script to run via cronjob and when I added it, it was not executing. Already tried to execute the script manually and there ...
0
votes
1answer
34 views

Variables (locally defined) not defined when running bash script from cron on MacOS

I have following script for backups creation: #!/usr/bin/env bash { declare -a directories=( "/Applications/Apache" "/Applications/Scripts" ) function ...
2
votes
1answer
43 views

Scheduled reboot with crontab didn't go ahead. Why might this be? [duplicate]

Information I have the following crontab for the root user on Debian 10. root@debian:~# crontab -l # crontab comments curtailed for serverfault # # m h dom mon dow command 30 3 * * * shutdown -r ...
1
vote
1answer
93 views

How to set up a cron job to send reminder e-mails in official Redmine Docker image?

In a Redmine container based on an official image on Docker Hub, I am trying to set up a cron job to send reminder e-mails periodically. As instructed here, typing bundle exec rake redmine:...
1
vote
0answers
15 views

Zimbra sends alarms for service restarts by its cronjobs

I'm trying to solve an issue where we get ~8 nightly mails from Zimbra OSE 8. They'll look i.e. like this one: Dec 21 00:46:15 hostname zmconfigd[16202]: Service status change: exhostname amavis ...
1
vote
0answers
21 views

zfs diff gives error on encrypted dataset (Key must be loaded to discover path names: Permission denied)

I'm running the following on Debian 10: zfs-0.8.4-2~bpo10+1 zfs-kmod-0.8.4-2~bpo10+1 I have a 2TB (passphrase encrypted) dataset used by many colleagues. I am also using Zabbix for monitoring, and ...
1
vote
1answer
205 views

cron takes UTC time instead of local time

I've a script set in cronjob to run at 00 hours but it runs 5 hours earlier ie at 7PM local of earlier day. I mean it was supposed to run at local 00 hours of local time but it ran at 00 hours of UTC/...
0
votes
2answers
92 views

How to stop requests on PHP server while it is running cron job sheduled PHP script?

I have a situation when some DDOS attacks are putting my PHP server down. Occasionally. I'm using AWS with auto scaling groups, so it is not a problem. The problems start when this server is going ...
0
votes
1answer
212 views

Scheduling a script execution with cron in a jail on FreeNas

I have a jail on my FreeNAS server containing Plex, and I have at the root of this jail a script called PMS_Updater.sh which checks if a new version of Plex is available and install it if it is the ...
0
votes
0answers
70 views

How to configure PATH in cron, so that it will be set for all crons?

I have a problem where scripts called by cron have very short, safe, path: /usr/bin:/bin I know, that I can: Change scripts to use better path in user crontab add PATH=... configuration But I'd like ...
0
votes
0answers
33 views

Web App - running Moodle - issue with running CRON job as a batch in a web job (was working but fails every time now)

I have a mooddle (LMS) azure web app, it requires a cron job to run every 1 min. This was setup in a batch @echo off D:\home\site\PHP\php.exe -f D:\home\site\wwwroot\moodle\admin\cli\cron.php > D:\...
0
votes
0answers
21 views

Null bytes in mail from cron job calling zfSnap

I am using openmediavault 5.5.12-1 (Debian 10.6). I added a cron.d file /etc/cron.d/my-backup: PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin MAILTO="me@domain.com" 0 0 * ...
0
votes
1answer
98 views

Cron jobs stopped working

I have an issue almost identical to what is here: Cron jobs not working anymore However I can't seem to find any memory-related problems as per the accepted answer, so I thought I should open a new ...
0
votes
0answers
25 views

Backup Database and Gzip the Backup

I'm backing up my database for 7 days and this is working fine. My Backups getting compressed to gzip files. But here is the problem. The "normal" backup has 13 Gb and the gzip just compress ...
0
votes
1answer
292 views

Authentication with pgpass not working

I am trying to set-up automatic backup for postgres db on a local headless server on Debian. I have a script: #!/bin/bash export PGPASSFILE='/home/mtn/.pgpass' pg_dumpall -U db_user --verbose 2>/...
0
votes
1answer
39 views

python script ran from cron Permission issues with creating and writing files

I've got a cronjob that triggers a python script. The python script creates files a new log file each time it runs and writes what its doing into these files. It also dumps data in .json format in a ...
0
votes
2answers
149 views

Update crontab of my web user using “sudo”

I need to update the crontab of my web user (the user that is executing all websites). In my crontab I'm using shell script with commands that needs to use "sudo". The script is well ...
1
vote
1answer
58 views

dovecot - changing inbox folder or move inbox mail for one user

I am trying to change where dovecot places new incoming emails from the inbox, to another folder, which i've named PreInbox OR I'd like to move all emails from inbox to PreInbox via cron or something. ...
0
votes
1answer
81 views

Stop cron jobs from sending emails as root but allow sendmail to work

I've recently got Postfix working as a send only MTA relaying through Google Workspace (formerly Google G Suite). I would now like to send emails after completed cron jobs to my personal email. The ...
0
votes
1answer
33 views

I want to run a command every 10 minutes in crontab on a certain directory [duplicate]

Running a server with Ubuntu 18.04 I am attempting to run this command every 10 minutes in crontab on the directory /var/www/html: find . -type f -name "*.maintenance" -delete Is this the ...
0
votes
1answer
21 views

Why cron tab not scheduling the cmd in linux [duplicate]

I create a cron by crontab -e and enter: 00 17 * * * mkdir /root/file1 at time 17:00 I don't find a file1 created by cron.... Please tell me what I do....
0
votes
1answer
55 views

I want to execute this job every 2nd and 4th week Monday to Friday

I want to execute this job every 2nd and 4th week Monday to Friday: 05 17 8-14,22-28 * 1-5 runBidWonReport.sh I want to execute this job every 1st and 3rd week Monday to Saturday: 05 17 1-7,15-21 * 1-...
-1
votes
1answer
45 views

php core script not getting called from Crontab

I am using core PHP and written a simple script that needs to be called automatically. For testing purpose I have just written a print statement as below, $host = 'localhost'; $user = 'admin'; $pass = ...
0
votes
2answers
937 views

Can't find certbot cron job after successful installation

I've developed a REST API in Node and installed nginx as reverse proxy in front of that in order to handle the SSL certificate from Letsencrypt. It's the first time I've set up nginx but everything ...
0
votes
1answer
54 views

How to kill the php page ran via Cron if it is still executing

I don't know whether this is right place to post this, if not please bear with me. I have CRON that executes PHP page at 03:00 am. This php page, goes through several data, that it takes an average 1 ...
0
votes
0answers
27 views

cron setup on FreeBSD instead of Cpanel

I am trying to install a cron with the instructions received which does not match with my current hoster. I received as instruction: " Enter the command "curl -s https: // /cron.php?token= &...

1
2 3 4 5
37