Questions tagged [cron]

cron is a task scheduler based on clock time that runs on Linux-based machines.

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

How to schedule a Job for every 1st Tuesday of the Month on Google Cloud Scheduler [migrated]

I'm trying to schedule a pre-determined function using an http response on Google Cloud Scheduler. I'm having issues scheduling the event for the proper time though. What I have currently is 30 10 ? ...
0
votes
0answers
61 views

Docker image with python and crontab

I am trying run a docker container with python code and crontab (scheduler) below is my script: Docker file FROM ubuntu:latest MAINTAINER docker@ekito.fr RUN apt-get update && apt-get ...
0
votes
1answer
37 views

How to change my cron job to auto update the geolite2?

A Prestashop e-commerce website is using MaxMind's GeoLite2-City database for country blocking. Instead of geoipupdate it uses this cron command to keep that database up to date: /usr/bin/curl -L --...
0
votes
0answers
11 views

Make directories last modified time match contained files last modified time

I have Pop!_OS 19.10 and use the default file explorer. I used to run macOS and whenever I'd add a file to a folder, the folder's last modified time would update to show the date when I added a file. ...
0
votes
1answer
336 views

Cron jobs not running on Kubernetes + Alpine linux

I am trying to run a cron job on Alpine Linux docker image which is then pushed in Kubernetes container. The Cron job is that I want the container to restart itself after every 15 mins. So my command ...
0
votes
1answer
78 views

Cron call to script giving errors, while executing script normally doesn't

I have been having problems with executing a script every second with Cron. This is in my cron file: * * * * * /var/webconfig/test.sh and this in my test.sh : #!/bin/bash cd /root/python-example ...
0
votes
0answers
12 views

cron output sent by mail instead of to file

On Debian 9.11 I added this to root's crontab: * * * * * echo $PATH &> /root/TMP.log I expected PATH to be written to the file, but the result is an empty TMP.log and the output sent to root ...
0
votes
1answer
45 views

fstab configuration: How to run automatic fsck scan on external harddrive at boot and automate backup to external hard drive

I have an external hard drive (type ext4) to which I make a daily backup of my /home folder and postgresql database via an anacron script. I have run into two problems: 1.) When the computer (Ubuntu ...
0
votes
1answer
25 views

Will anacron backup interfere with automatic fsck diskcheck on Ubuntu 18.04

I have a general question. I have a backup scheduled every day to back up my home folder and postgresql database to an external hard drive (file type ext4). The mount point of my external hard drive ...
0
votes
1answer
49 views

mac screenshot crontab only got desktop

I have a little crontab code that takes a screenshot of my mac every 15 mins, as a diary thing to help me with all the administrative works. It has been working fine for a few years now but recently ...
0
votes
1answer
30 views

What's calling my shell scripts?

i've been given the task to have a pals server download a news audio file at 4 given times over the weekend and put them into his webs audio directory. Don't stone me, here's what i came up with: #/...
0
votes
0answers
44 views

permissions issue when running rsync via crontab

I'm using rsync to backup directories on my local machine to a remote server. I have SSH key-based access set up and working for my user, so when I run the command: rsync --update -razvP --progress ~/...
1
vote
1answer
47 views

Restart ea-tomcat85 from crontab

I have written a script to restart tomcat service # timestamp ts=`date +%m-%d-%Y_%H:%M:%S` echo "$ts: Restarting ea-tomcat85..." &>> /home/account_name/restartservice.log ubic restart ea-...
0
votes
0answers
17 views

How to register a ban on freezing tabs in the extension for Google Chrome?

Good afternoon, I came across a problem: you need to create several php-workers who will listen to the RabbitMQ queue server. Googled 4 options for implementing the task: Cron with a preliminary ...
1
vote
1answer
20 views

Ubuntu Shell: Use cron to run 3 scripts consecutively, second must remain running in the background

I've come across the following scenario in one of the servers I recently have to manage. Its an Ubuntu used as a music streaming server, the music must be changed according to an schedule but the last ...
0
votes
1answer
137 views

I am getting an error trying to get cron to run on/against a docker container. Anything I am missing?

I followed this guide on my unRAID server within my docker container (siwatinc/ubuntu-playground) and got it to work successfully. I installed cron on a docker image called UbuntuPlayground and all ...
0
votes
1answer
31 views

How to setup a conditional cron job in raspbian

If (SYSTEM_IP != SOME_IP) sudo openvpn client.ovpn ELSE exit Frequency - every 5 minutes To be executed in a linux shell I need this task as my raspberry pi may lose the internet ...
0
votes
0answers
150 views

Renewing Certbot LetsEncrypt WILDCARD Certificates in Cron

I've been searching for a good solution to renew WILDCARD certificates from LetsEncrypt. Its easy to set up a wildcard certificate: Apache Debian 9 Stretch: sudo apt-get install certbot python-...
0
votes
3answers
99 views

How to delete a file owned by different user using a bash script?

I have a bash script that should remove a file from /tmp. Problem: the file is created my user mysql during SELECT INTO OUTFILE export. Thus the script-running user does not own the file. Still, how ...
0
votes
1answer
131 views

Linux - run script every 5 mins as long as user is logged in

I need to run a script when a user logs in and need to run the script every 5 minutes as long as the user is logged in. Script should run within the users security context and should stop running when ...
0
votes
0answers
38 views

How do I let my server turn itself off and on with cron when it uses an lvm encrypted disk?

I once had a ubuntu server set up (a minecraft gameserver for my little brother) and to save on electricity and to not make so much noise, it shut itself down in the evening and then turned back on in ...
0
votes
2answers
55 views

Pg_dump and rsync backup script not working in anacron

I have two sh scripts called Z-backup and lb. Z-backup is a script that I have placed in cron.daily so it is run as an anacron job and calls the lb script. The content of the Z-backup script is: #!/...
0
votes
0answers
48 views

docker container run --stop-timeout will not kill the container

Context I need to run periodically (1 min) a script which is run through a docker container, and to ensure that the script will neither take too long to execute nor will be overlapped by the next one....
0
votes
1answer
56 views

How to Create CRON Jobs that Require SUDO Permissions

I'm on Ubuntu 19.04 (Disco Dingo). I've added my regular user acc. in SUDOERS and only use root when I'm bound to. Now, I've created a basic script to automate my updates and free up some space. It ...
0
votes
1answer
71 views

How does Chromium on linux get auto updated?

I often see new features getting added to my chromium browser in Ubuntu 18.04 - without me having run a package upgrade. I also haven't found any running cron job that upgrades packages. This what ...
0
votes
0answers
27 views

cron.daily in etc/anacrontab - General?

I have a rather general query. Why is cron.daily, cron.weekly, cron.monthly in /etc/anacrontab? If I place a sh script in one of those cron. files are they treated as anacron or cron jobs? That is to ...
0
votes
0answers
44 views

Crontab Inactive

The Crontab on my system keeps disabling. I have to restart the cron daily or manually run the cron myself. I have check numerous things online and nothing seems to fix it. Here is the output for ...
0
votes
0answers
28 views

Convert crontab commands to systemd?

I am using crontab in centos and I am having many problems such as some commands are not executed or simply not running any and simply deleting the crontab file and putting the same lines back is ...
-1
votes
2answers
24 views

Setting virtualenv and running python code on boot

I'm trying to have some code executed on boot and haven't been able to get it to run as rc.local, cron, or a system service. So I'm sure I'm doing something wrong -- I just don't know what. These are ...
0
votes
0answers
16 views

Script run via cron results in empty file [duplicate]

I wanted to measure connection speed to internet - I want to know if slow speed is fault of wifi interference or my internet provider. So I wrote this script: #!/bin/sh name_of_file=$(date +'%d-%m-%...
1
vote
2answers
42 views

Run a script one time per day

I think my question applies to "computer software", if not, please tell me. So I set up a WebDav mount so i can load my password-database with keepassxc without any problems. Now I want to backup the ...
0
votes
0answers
26 views

cronjob set in user shell being run by root

If we configure a cronjob for a non-root user, will it be run by the user in whose shell the cron is set or by root? I set up a simple cron job in the shell of a user 'user1' and say he is part of a ...
0
votes
0answers
155 views

pm2 'cron_restart' option went wrong

I have script to run, with different cron options configured in .ts file import * as pm2 from 'pm2'; pm2.connect(function(err) { if (err) { console.error(err) process.exit(2) } pm2.start({ script: '...
0
votes
1answer
705 views

crontab job log message shows a error status 0x004b from mta#012

The crontab job log message shows a error status 0x004b from mta#012 when I try to check my crontab job. # grep CRON /var/log/syslog [...] I get this log: Nov 26 08:00:01 stiitsrv9 CRON[26109]: (...
0
votes
1answer
41 views

how to add timestamp to file names when moving them to cloud storage using cron job in ssh

I have built an ftp server on google compute engine that receives data from on prem systems as csv. I want to move this data after receiving it to a google cloud storage using a cron job from the vm ...
0
votes
0answers
59 views

Does a linux cronjob run as root, truly run as root?

Had a weird error where a script would work perfectly running in a SSH terminal, yet silently fail on a few lines when run via cron. The cron did run and went to the end, several actions were ...
1
vote
0answers
124 views

Setting file permissions so my Laravel command / cron task can read and write to my FTP folder

I have an ftp folder that I created working through a guide to allow one specific user. I have since run a few chmod commands and may have changed this but the FTP user was created in a way so they ...
0
votes
0answers
29 views

Why doesn't a GUI application in crontab open with auto-login?

I want to start a GUI application through crontab on reboot. I have setup the crontab as @reboot export DISPLAY=:0 && ./myscript.sh and it works perfectly fine when auto-login is disabled i.e. ...
0
votes
2answers
331 views

Monitor a directory for changes and FTP a file to a server

I am looking for a specific command/script for a cron job I want to perform. Basically, I have a WordPress website that when you fill in a form writes a png file to a folder. usually with a name like ...
0
votes
0answers
10 views

Facing Issue during Setup Amazon Web Server - Simple Email Services Autoresponder

My AWS-SES account perfectly working but facing issue in autoresponder. I am trying to set up the Autoresponder, and when clicking on Autoresponder tab under the particular list, It's opening pop-up ...
0
votes
0answers
92 views

Error 500 with cron job, but no problems in CLI

I have a ubuntu 18.04 server running which unfortunately has a dynamic IP. I have set up a free DDNS for it via duckdns and followed the instructions to have my ip updated once in a while with cron. ...
0
votes
1answer
28 views

Attaching to a screen session on boot

What I'm trying to do is start a screen session on boot via crontab and then have the user automatically connect to that session. Here's my current cron file: # Edit this file to introduce tasks to ...
0
votes
0answers
44 views

cron @reboot ubuntu ldap dependency

Question: Users can configure cronjobs @reboot, but the cron environment @reboot is not ready for users. How can cron be forced to run only after the user environment is ready on Ubuntu? On a Ubuntu ...
0
votes
0answers
36 views

Failed to start crond on Centos 6

I noticed that crond is not running, tried to start it with service crond start but I get this error Starting /usr/sbin/crond: [-] Error 0x7a911401 in attaching to process! Any idea how to fix ...
0
votes
1answer
49 views

Piping top to text via with crontab and full message?

I am running this: top -b -n 1 -o %MEM > /home/me/top/top.`date +\%F.\%H\%M`.txt Which works fine when I run it, but when I put in crontab for every 10 mins, the COMMAND section is always cut off,...
1
vote
2answers
59 views

Cronjob fails with “ipset not found” but runs flawlessly on command-line

When I call a script from a (root) cronjob it fails with the message 'ipset not found'. Here is the problematic script line: for i in $(cat /etc/cn.zone); do ipset -A china $i; done Some lines ...
0
votes
2answers
111 views

Crontab Running Script Every Minute

I am currently trying to schedule a cronjob to run a .sh script file every minute. This is my simple script: #!/bin/sh echo "Hello World" >> /Users/navania/crontab-scrip.log I saved this on ...
1
vote
1answer
594 views

Pm2 can't restart processes after long periods of time

I want to run my node.js server on my linux server (shared hosting) basically indefinitely. Originally, I've set it up using forever, which worked for a while. But, I've noticed that after around 2 ...
0
votes
1answer
139 views

Reason for Failure to read stdin of passwordeval program of msmtp under cron

I use msmtp as the sendmail program on my Ubuntu 18.04 system. Rather than have the password of smtp service sitting in the clear in my msmtprc file, I have written a small ruby program that I call "...
0
votes
0answers
11 views

Users are getting logged out automatically

I need some suggestion on users using EMR (web application) is getting logged out automatically intermittently, it may happen sometime in a week, maybe in two days or in 15 days. My application runs ...

1 2 3 4 5 16