Questions tagged [cron-task]

cron-task is a task (command or shell script) executed periodically at certain times or dates by the cron scheduler.

Resources

925 questions
16
votes
6 answers

logrotate cron job not rotating certain logs

I added two scripts in "logrotate.d" directory for my application logs to be rotated. This is the config for one of them: { compress copytruncate delaycompress dateext missingok notifempty daily rotate 30 } There is…
Ashok
  • 531
  • 1
  • 3
  • 12
13
votes
6 answers

Cron job can't load gem

I have a ruby script that connects to an Amazon S3 bucket and downloads the latest production backup. I have tested the script (which is very simple) and it works fine. However, when I schedule this script to be run as a cron job it seems to fail…
Jaco Pretorius
  • 24,380
  • 11
  • 62
  • 94
11
votes
4 answers

How to run cron job every day in asp. Net core application?

I have a web application written in asp. Net mvc core 2.2. O need to run a schedule job every day at 3:00 Am. What is the best way to do it? I tried hangfire it stops after some time. We need to set IIS server always running. I googled and found…
Umer Waheed
  • 4,044
  • 7
  • 41
  • 62
10
votes
1 answer

Persist my cron jobs and execute them even if my node server restarted

I have my app in node js and i want them to be executed on its scheduled time But the problem is in between that if my server crash/stop/restart then those scheduled jobs are not persisted and are not executed. Also, all my jobs are scheduled and…
10
votes
6 answers

How to schedule dynamic function with cron job?

I want to know how I can schedule a dynamic(auto populated data) function to auto run everyday at saved time? Let's say I have a form that once the button is clicked it sends the data to the function, which the posts the data. I simply want to…
iBrazilian2
  • 2,204
  • 6
  • 23
  • 45
10
votes
5 answers

CakePHP 2.3.8: Calling Another Controller function in CronController.php

For CakePHP 2.3.8 How can I call Another Controller function in CronController.php Any ideas?
Aditya P Bhatt
  • 21,431
  • 18
  • 85
  • 104
10
votes
2 answers

Running cron job creates an error unexpected EOF while looking for matching ``'

I can see that this is "usual" error, but can not find solution in my case... Running Crontab job with: expr `date +%W` % 2 > /dev/null && curl https://mysite.com/myscript It causes errors: /bin/sh: -c: line 0: unexpected EOF while looking for…
user198003
  • 11,029
  • 28
  • 94
  • 152
9
votes
1 answer

Running cron job/task at every hour

Which one is the correct syntax for running a job at every hour? 0 0 * * * * 0 0 */1 * * * Also how are they both different?
N.A
  • 187
  • 1
  • 1
  • 5
8
votes
2 answers

Scheduled job executes multiple time in Evernote- AndroidJob

I have one periodic job I want to run and it is implemented with the help of Evernote's Android Job library. What I wish to achieve is to updateMyLocation ever 15 mins. The problem is that every 15 mins, the job seems to be executing multiple…
rgv
  • 1,186
  • 1
  • 17
  • 39
8
votes
1 answer

Cron Job Doesn't Run

I am new to using crontab, and I've been trying to get a simple cron job working. The code for the cron job is as follows: */1 * * * * echo "job every minute" So just for proof-of-concept, I want to see this printed every minute. I have tried…
MEric
  • 946
  • 3
  • 12
  • 30
8
votes
4 answers

Constantly monitor a program/process using Python

I am trying to constantly monitor a process which is basically a Python program. If the program stops, then I have to start the program again. I am using another Python program to do so. For example, say I have to constantly run a process called…
Rkz
  • 1,237
  • 5
  • 16
  • 30
8
votes
5 answers

Linux Perform MySQL Backup to time-based path from Webmin

I was trying to setup a scheduled task in Linux Ubuntu Server 12.04 (CronJob) to perform a daily backup of all my MySQL Databases on midnight. I have installed the known Webmin (A nice web interface for managing the Web Servers). So my issue is:…
Ammar
  • 169
  • 1
  • 2
  • 7
7
votes
1 answer

How can I specify cron timezone in k8s cron job?

According to documentation (https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) I can create cron job in k8s with specify timezone like: "CRON_TZ=UTC 0 23 * * *" My deployment file is: apiVersion: batch/v1 kind: CronJob metadata: …
7
votes
1 answer

Start crond.service on Ubuntu 16.04

I am programming some schedule task in my Ubuntu 16.04. But when I try to start the crond.service by sudo service crond start I receive the message crond.service Loaded: not-found (Reason: No such file or directory) Active: inactive…
hildogjr
  • 754
  • 2
  • 6
  • 17
7
votes
4 answers

Execute Python script every hour on MacOS

Goal I have a script written in Python. connect to database insert some fake data My goal is execute that script every hour. database.py #!/usr/bin/python import MySQLdb import random import requests import time db =…
code-8
  • 54,650
  • 106
  • 352
  • 604
1
2
3
61 62