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
0 answers
24 views

Add Trigger Events to a Schedule Queue in Linux

I have a MySQL table on a Ubuntu or CentOS machine which contains rows on when to start and stop a bunch of 1000 AWS / Azure servers. Right now its implemented in such a way that a cron is running ...
anjanesh's user avatar
  • 327
0 votes
0 answers
52 views

solaris 10 cron job won't run but will run fine from command line

#!/bin/sh #grab oldest file from queue stuff=\`ls -1 /var/spool/lp/requests/localhost/ | /usr/bin/head -1\` #pull printer name from lp requests (first line in file) puff=\`cat $stuff | /usr/bin/...
Eve Bum's user avatar
0 votes
0 answers
17 views

Cron job is wokring fine but new cron logs are not adding in cron log file

i mistakely press wq! in cron log file located /var/log/cron now new logs are not updateing in cron log file i serach many thing like remove cron file and touch /var/log/cron Steel not updateing ...
Nipun Agarwal's user avatar
1 vote
1 answer
41 views

/etc/cron.d not running job [duplicate]

I need to run a script as a user to backup my database every night. I added the following cron job in /etc/cron.d/backup-mysql via ansible. 0 3 * * * backup_mysql /path/backup-mysql.sh I can see the ...
Ror's user avatar
  • 321
0 votes
2 answers
66 views

How to run a python script in a specific directory automatically?

I have a python script that I wish to run at 5pm every Friday. How can I achieve that ? I understand I could do this through cron. However, as I have used relative file paths in the Python script and ...
LT_Orange's user avatar
0 votes
0 answers
15 views

Dillon's dcron SYNC and ASYNC

The specific question for cron using Dillon's minimalist cron version is: How to create a cron job that runs every first Friday of the month, in ASYNC mode? Dillon's cron attempts to mix synchronous ...
DrBeco's user avatar
  • 109
0 votes
1 answer
61 views

crontab job output not generating email

I have been running many cron jobs (on various operating systems, CentOS, for example) that normally run with no output. I usually keep an eye on my jobs by checking my email. I use the fact that ...
EK0's user avatar
  • 225
1 vote
1 answer
68 views

Cron executes while partly ignoring trigger

There's a problem with my crontab I set */5 * * * * /home/money/relaunch.sh in crontab -e in relaunch.sh is #!/bin/bash /usr/bin/pgrep -l -x xyz || /home/money/a.sh && /home/money/xyz.sh ...
God of Money's user avatar
1 vote
1 answer
35 views

CentOS scheduled OOH restart of service

I would like to schedule a one-off OOH restart of a service using cron. Can I just add something like: /usr/sbin/service myservicenamehere restart ... in the crontab, to run once?
btongeorge's user avatar
1 vote
1 answer
116 views

Redirecting stdout and stderr doesn't work with cron

I have the following cron task. Expected behavior is that every output (standard output and standard error output) of this task will be redirected to /dev/null. Unfortunately this doesn't work. Emails ...
XorOrNor's user avatar
  • 239
0 votes
0 answers
22 views

Change default cron log location

I have apache server with $HOME is var/www/, I create a cron job and all logs get into that directory, how to change it to another folder? Is there any config file on apache to change that? Btw, I'm ...
Cross Vander's user avatar
0 votes
0 answers
23 views

why almalinux is hanging over night with auditlog

hey there is a hosting server overnight my server hanged up and must to restart it in morning to get it back online and saw this error in my console (you can see the picture) please help me https://...
ali rahmani's user avatar
0 votes
0 answers
133 views

Cronjobs not running (Job execution of per-minute job scheduled delayed) [duplicate]

The cronjobs on an AlmaLinux 9 64bit system are not running. I added 2 simple jobs to the crontab, which run fine from the command line: [root@sendy ~]# crontab -e * * * * * date > ~/cron....
Ivarvdw's user avatar
0 votes
0 answers
141 views

logrotate works manually but not works automatically via cron on Ubuntu 18.04

I have a logrotate task to rotate my nginx logs. I have my config file in /etc/logrotate.d/nginx. When I run logrotate -f /etc/logrotate.d/nginx, it can rotate the logs correctly, which means my ...
Hank Chow's user avatar
  • 111
0 votes
1 answer
74 views

Error when I execute crontab in linux

I'm executing a crontab where it call the script of python and the crontab are executing very well, but when I execute the crontab I need its will create other file in another directory, but that ...
CristianDAG's user avatar
0 votes
0 answers
97 views

cron / crontab : auto delete oldest backup files when new files get backed up, only if disk space is near capacity

I am using crontab (on Ubuntu Server 20.04) to automatically create daily backups of a text file and storing them on an external hard drive. I am using the following crontab to create my backups: @...
DanRan's user avatar
  • 93
0 votes
1 answer
50 views

crontab job did not start on CentOS7 [duplicate]

here is the crontab for root on my CentOS7 : # crontab -l # Lines below here are managed by Salt, do not edit # SALT_CRON_IDENTIFIER:CLEANCORE 0 * * * * /var/lib/scality/cleancore/clean_core.bash --...
SebMa's user avatar
  • 297
0 votes
0 answers
35 views

Crontab I have tried cronitor airplane nothing helps

my crontabs do not run, sys log gives me this, Jan 6 08:30:02 joe-sbc-flt1 CRON[102851]: (joe) CMD (/home/joe/scripts/watchit.sh) I have no idea what it means or what is wrong, can anyone help?
extra views's user avatar
0 votes
1 answer
102 views

Cron Jobs don't run all the time (just a part of the hour)

I work on a website who is using cron jobs for import and update products. The platform is Woocommerce. The supplier offered the csv file, and a server requirements. I have them over the requested: ...
Alin Horne's user avatar
0 votes
0 answers
30 views

Cron Job Shell Backup file: Permission Failed

Ive been trying to create a Cron Job to Ultimatly back up the Data within my Public Html File backup-JMORetail.sh Code #!/bin/sh NOW=$(date +'%Y.%m.%d') tar cfz /home/jmoretai/Back-Ups_Local/...
jojojo1102's user avatar
1 vote
1 answer
213 views

What is the best directory to place your cron jobs?

We have a machine that executes cron jobs. We'd like to upload (via scp) cron job files to. Here is an example of a cron job file (test.cron): * * * * * echo "test" > /tmp/test_cron This ...
Titi's user avatar
  • 13
0 votes
1 answer
392 views

Cronjob "No space left on device" when logging error but there is space [duplicate]

I am trying to troubleshoot some cronjob problems I am having so I wanted to start logging them. * * * * * wget https://www.example.com/dosomething.php >> /var/log/myjob.log 2>&1 When I ...
Cesar Bielich's user avatar
0 votes
1 answer
71 views

is my crontab syntax invalid?

simple question: 10 4 * * * rm -rf ~/code/rehlds/build/ && ~/code/rehlds/build.sh --compiler=gcc --jobs=4 > /dev/null 2>&1 I checked an there is no /build folder which indicates ...
eetzt's user avatar
  • 1
0 votes
2 answers
112 views

How to make timeout(1) behave in cron like it behaves in interactive shell

Running this command in an interactive bash: $ timeout 1 sleep 2; echo $? 124 returns 124 after 1 second, as expected and as documented in timeout(1). However, if I run the same as a cron job, or if ...
Sebastian Stark's user avatar
-1 votes
2 answers
70 views

mailx Set Name of Attached File

I have a cron job, whose output I send to mailx: # Monday morning at midnight; "mail" is symlink to "mailx" 00 00 * * mon python3 script-with-7500line-output.py | mailx -S 'from=...
Weylin Piegorsch's user avatar
0 votes
3 answers
174 views

Crontab not working as expected [duplicate]

Dears, i configured script in crontab to run every 10 minutes and its not working at all. I dont see any entry in configured log path (/var/log/cron) "*/10 * * * * example_script.sh" ...
Sudoo's user avatar
  • 11
0 votes
1 answer
374 views

CRON Job to delete files (not folders) with specific extensions within a folder and subfolders

I need a cron job that will delete all files with these extensions (.jpg, .jpeg, .png, .pdf) in a folder (including files in subfolders, but not the subfolders themselves) twice a day. I'm using ...
timarion's user avatar
0 votes
0 answers
47 views

GAWK not running in crontab

I have the below script running successfully manually. But when it is executed in crontab (below), I dont see anything happening. Script #!/usr/bin/gawk -f #!/bin/bash PATH=/usr/local/bin:/usr/bin #...
serverstackqns's user avatar
1 vote
0 answers
201 views

Cron not working after pam customization to check groups

I need help with a PAM configuration. I've a Debian 11.5 machine with kerberos connected to an MS AD server. I want to configure the machine in order to allow some AD user to login, filtering them by ...
Lorenzo Sorace's user avatar
0 votes
1 answer
66 views

What time is used when I set crontab @daily?

What time is used by crontab when I use the option @daily? Where is this information stored on Debian/Gnome? And how can I change this time value?
Module_art's user avatar
0 votes
1 answer
75 views

Alternative to incron in Photon OS

I'm setting up a server with Photon OS. I need to get a notification everytime a file is modified. I used incrontab in former Ubuntu Server setups, but this utility is not available in Photon OS ...
jlanza's user avatar
  • 113
0 votes
1 answer
421 views

Using Crontab to run a shell script with SSH

I’m trying to use a cronjob to run a shell script on my EC2 instance, which SSH’s to a server to get a mongodump of a database and restore at a given specific time without me having to login. I’ve ...
vincecalpari's user avatar
1 vote
1 answer
24 views

Crond Inactive Every Other Minute

I have a problem with crond (dated 13Feb21) on my Slackware 14.2 x86_64 (Linux version 5.12.10) server. I have a script that crond runs every minute that accesses an external device for current data ...
PK232's user avatar
  • 11
1 vote
1 answer
382 views

CRON not sending output to email, but writing output /var/log/cron

I have a Rocky 8.5 server. Initial settings in Cron as follows (same as our other servers, which work fine forwarding cron output emails) HOSTNAME=xxxx CVS_RSH=ssh MAILTO=yyyy@zzzz 35 * * * * /usr/...
Ian's user avatar
  • 133
0 votes
0 answers
72 views

banning IPs from file in Fail2ban

I've installed fail2ban and it's working fine in banning IPs that try to access ssh with invalid username/password even if they tried once. Now I'm receiving key exchange attacks that fail2ban doesn't ...
Bekr's user avatar
  • 3
0 votes
0 answers
308 views

php artisan schedule:run running twice by root and ubuntu user?

we are having a problem that kernel commands running twice. I checked if the schedule runs the command and if it exists more than once. I check with this command ps aux | grep "artisan schedule:...
web pakistan's user avatar
0 votes
0 answers
65 views

Debian 10: user cron does not runl; cron[xxx]: Permission denied

all. Weird errors when trying to run cron on a Deb10 instance. Root is the only user that succeeds in cron. I've tested a simple called to logger and a script that sends an email. No errors running ...
AaplMike's user avatar
  • 167
0 votes
0 answers
72 views

Use EasyCron to make cURL request with cronjob

I want to make a cURL request every 12 hours and trigger the request with a cronjob. Unfortunately I'm a total newbie in cURL and cronjobs. This is the request I want to make: curl --location --...
Cray's user avatar
  • 135
0 votes
1 answer
25 views

Move Services From Servers in Aws

Could anyone advise the best method(s) to move service from one EC2 instance to another? For example Test-dev we want to spin up and replace with TEST (server) but we want to get CRON services and ...
samtech 2021's user avatar
0 votes
2 answers
92 views

How do i run a cronjob every 100 days

What would a crontab syntax look like for a command to run every 100 days? I need to run a reboot every 100 days
badman's user avatar
  • 103
1 vote
1 answer
349 views

start-stop-daemon: command not found . This error only occurs at boot time in a cron job

I have scheduled an @reboot cron job to start a service in /etc/init.d After boot, service is not started when I reach shell command line. The contents of /var/log/cron show the following, 2022-09-...
Ksenia Semenova's user avatar
2 votes
1 answer
193 views

How to change the default email address for the non-root user in postfix?

I have a user called admin (not root) and have setup everything under that user's account. I have also crontab that is meant to run a bash script at a certain time in the day. For some reason the ...
Houman's user avatar
  • 1,485
-1 votes
2 answers
76 views

Crontab query - won't execute program [duplicate]

Noob question. I have an executable file saved here: /home/pi/auroramon-1.07/src/auroramon When I enter /home/pi/auroramon-1.07/src/auroramon in the command line the program runs. I created a crontab ...
ajl's user avatar
  • 1
1 vote
1 answer
43 views

What is supposed to happen to running cron processes after modifying them with crontab -e?

So here's the situation: I start a program @reboot with Cron (OS is Debian 11). This program keeps performing tasks unless it encounters an illegal state. I change the CLI variables for this program ...
MaestroMaus's user avatar
0 votes
3 answers
1k views

Crontab not found in docker image

I have a docker image set up by another person, and it doesn't seem to have cron installed. When I tried to run crontab -l (be it as a root or non-root user), it says command not found. But I do see /...
Rayne's user avatar
  • 211
0 votes
0 answers
22 views

gio operation not supported in a cron task [duplicate]

I have a task (script) that I added via crontab -e (Ubuntu 20.04). The task uses gio to copy a file in /tmp (that was created a line before in the script) to Google Drive. Running the gio command in a ...
IttayD's user avatar
  • 1,077
1 vote
1 answer
37 views

Hosting resource intensive PHP cron jobs

My website is currently running on a VPS. To make the site work, I have a number of resource intensive cron jobs - and when they are running, my site stop responding/becomes incredible slow. I'm ...
Mads's user avatar
  • 11
1 vote
1 answer
392 views

How to monitor scripts executed via cron and perform action on elapsed times?

I run numerous scripts via CRON throughout the day, and as they rely on third-party providers which sometimes are slow, I currently run them like so timeout 60m bash /script.sh and that's worked great ...
alturic's user avatar
  • 11
0 votes
2 answers
78 views

Duplicity Macos crontab (python errors )

I am having errors while running duplicity in macOS (crontab) The duplicity command is as follows (works in Command-line) /usr/local/bin/duplicity /Users/myname/go file:///Volumes/EVO840\ -\ IMPORTANT/...
Someone Special's user avatar
-1 votes
2 answers
1k views

Cron job to backup the MySQL database produces empty dump files with no errors logged that I can find

My site is controlled via cpanel. I want to automate the backup of my databases and then automate their download to my development machine. The first step was to set up the cron jobs as follows 0 3 ...
Rohit Gupta's user avatar

1
2 3 4 5
39