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
572
votes
12 answers

Restarting cron after changing crontab file?

Do I have to restart cron after changing the crontable file?
bArmageddon
  • 8,088
  • 6
  • 22
  • 40
172
votes
16 answers

AWS Lambda Scheduled Tasks

Amazon announced AWS Lambda (http://aws.amazon.com/lambda/). The product description includes: Scheduled Tasks AWS Lambda functions can be triggered by external event timers, so functions can be run during regularly scheduled maintenance times…
Nathan H
  • 48,033
  • 60
  • 165
  • 247
124
votes
7 answers

How to run a cronjob every X minutes?

I'm running a PHP script in a cronjob and I want to send emails every 5 minutes My current (crontab) cronjob: 10 * * * * /usr/bin/php /mydomain.in/cromail.php > /dev/null 2>&1 The cronmail.php is as follows:
Savan Paun
  • 1,723
  • 2
  • 16
  • 24
103
votes
14 answers

Scheduling Python Script to run every hour accurately

Before I ask, Cron Jobs and Task Scheduler will be my last options, this script will be used across Windows and Linux and I'd prefer to have a coded out method of doing this than leaving this to the end user to complete. Is there a library for…
sunshinekitty
  • 2,307
  • 6
  • 19
  • 31
88
votes
11 answers

Using CRON jobs to visit url?

I have a web application that has to perform a repeated tasks, Sending messages and alerts, I, already, use a script page do those tasks when it loaded in the browser i.e http://example.com/tasks.php and I included it by the mean of iframe in every…
SaidbakR
  • 13,303
  • 20
  • 101
  • 195
54
votes
4 answers

Append current date to the filename via Cron?

I've created a Cron task at my webhost to daily backup my database and I would like it to append the current date to the filename. My Cron job looks like this mysqldump -u username -pPassword db_name > www/db_backup/db_backup+date%d%m%y.sql But the…
Emil Devantie Brockdorff
  • 4,724
  • 12
  • 59
  • 76
46
votes
2 answers

How to create cron statement to run for multiple hours

I need a cron statement to run for few hours eg 1-8 then 10-15. In this case will the following statement work, 0 1-8,10-15 * * * If not can anyone help me? Thanks in advance, Gnik
Gnik
  • 7,120
  • 20
  • 79
  • 129
35
votes
4 answers

Difference between cron, crontab, and cronjob?

Technically speaking, what is the difference between a cron, crontab, and cronjob? From what I can gather, cron is the utility on the server, crontab is a file which contains the time intervals and commands, and cronjob is the actual command (or…
Leo Galleguillos
  • 2,429
  • 3
  • 25
  • 43
31
votes
2 answers

Trigger hourly build from scripted Jenkinsfile

Is there a way to trigger a Jenkins job to run every hour using the Jenkinsfile scripted pipeline syntax? I have seen examples using the declarative syntax, but none using the pipeline syntax. Declarative Syntax Example pipeline { agent any …
Alex
  • 5,364
  • 9
  • 54
  • 69
26
votes
2 answers

linux difference between "sudo crontab -e" and just "crontab -e"

I noticed that when I typed sudo crontab -e I dont see my cron command, but when I do only crontab -e there is my command. Is there a difference between the 2? If there is, where should I put my cron command, should it be in sudo or without the…
PinoyStackOverflower
  • 5,214
  • 18
  • 63
  • 126
25
votes
8 answers

Scrapy crawler in Cron job

I want to execute my scrapy crawler from cron job . i create bash file getdata.sh where scrapy project is located with it's spiders #!/bin/bash cd /myfolder/crawlers/ scrapy crawl my_spider_name My crontab looks like this , I want to execute it in…
Beka Tomashvili
  • 2,171
  • 5
  • 21
  • 27
25
votes
3 answers

How to create a cron task in Symfony2

I have a little question, how create a simple cron task who call some service action in Symfony, who could be executed automatically each night ?
user2178964
  • 124
  • 6
  • 16
  • 40
20
votes
1 answer

Can't install CRON job

When I try installing my Cron job I get the following error: "crontab.txt":8: premature EOF errors in crontab file, can't install
Yogzzz
  • 2,735
  • 5
  • 36
  • 56
18
votes
5 answers

Crontab is not running local/bin/ script. Catalina, BigSur

I just have started to use crontab and have some problems with it. I have already read some posts about how to use it on macOS, but it still not working. So, I write crontab -e, then edit it to */1 * * * * cliclick -w 1 m:3,3 (for example) - which…
0x0000dead
  • 330
  • 1
  • 4
  • 12
17
votes
6 answers

How to design a distributed job scheduler?

I want to design a job scheduler cluster, which contains several hosts to do cron job scheduling. For example, a job which needs run every 5 minutes is submitted to the cluster, the cluster should point out which host to fire next run, making…
coderz
  • 4,847
  • 11
  • 47
  • 70
1
2 3
61 62