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
7
votes
2 answers

Dynamically update nodejs cronjob period

I need to do some task periodically in my nodejs app. If it was fixed period then it is working fine. But in my case the period should change dynamically. below is my code which was not working as I expected. here cronjob is not updating it's period…
kamesh
  • 391
  • 2
  • 3
  • 11
7
votes
4 answers

Does cron job block the main process or nodejs will create a worker to do cron task

I am using node-cron to do some heavy tasks (update database) every minute. Does this task use main process to work or nodejs will create some workers to do these taks? var CronJob = require('cron').CronJob; new CronJob('0 * * * * *', function() { …
Vo Thanh Thang
  • 330
  • 1
  • 5
  • 16
7
votes
1 answer

convert wget cron command to curl

I would like to change the following wget cron commands to curl format: wget https://www.yoursite.com/index.php?route=cronjob/cronjob -O /dev/null wget --quiet --delete-after…
BigMac
  • 81
  • 1
  • 1
  • 2
7
votes
2 answers

Python Script not running in crontab calling pysaunter

I have read multiple posts and many articles detailing that scipts in a cron job need to keep the environment variables necessary to run inside the script itself due to the opening of shells within cron. My situation is unique in that my path…
derigible
  • 964
  • 5
  • 15
  • 32
7
votes
3 answers

How to get django-cron to work automatically

I am trying to get django-cron working and its not. I followed the instruction here to set up my cron but the problem is that my job only runs when i type python manage.py runcrons on my command line and the job is not run every 5 minutes. I don't…
flexxxit
  • 2,440
  • 5
  • 42
  • 69
7
votes
5 answers

Adding the time to mysqldump cron job?

The following works: /usr/bin/mysqldump -u[username] -p[password] --all-databases --single-transaction > /home/[domain]/public_html/backups/full_backup_`date -I`.sql It results in "full_backup_2012-11-04.sql" The cron job is going every minute but…
Luke Wenke
  • 1,149
  • 2
  • 23
  • 43
7
votes
5 answers

When does wp-cron.php run in Wordpress?

I need details about wp-cron. I used wp_schedule_event for automatically sending emails. But wp_schedule_event is only triggered when a user visits our site. How to make the cron run automatically?
softsdev
  • 1,478
  • 2
  • 12
  • 27
7
votes
2 answers

How to limit shell script execution time?

I have a scheduled cron job (which is actually a shell script). I'd like to limit the script execution time as it can work unacceptably long. For some reason I can not limit the script execution time from inside the script. Actually, I want my…
Maksym Polshcha
  • 18,030
  • 8
  • 52
  • 77
7
votes
3 answers

Cronjob with password protected site (.htaccess)

I want to create a cronjob that every X time goes to open a webpage. This webpage is password protected by .htaccess (user=admin, passwor=pass). The instruction I give is the following: wget --user=admin --password='pass'…
Avionicom
  • 191
  • 2
  • 5
  • 19
6
votes
2 answers

Kotlin retry scheduled cron task if failed

I have a Kotlin scheduling config file below. It has an important task scheduled to run at 11am each Monday. What do I need to do for building resiliency or retry attempts in case the service is down at 11am? Can these Spring Boot and Kotlin…
William Ross
  • 3,568
  • 7
  • 42
  • 73
6
votes
2 answers

Supervisor VS CronJobs

I have to run a laravel command php artisan queue:work --daemon to run jobs stored on Beanstalkd queues. I have come across two possible solutions: Run commands using Supervisord: Register a command in the config files of Supervisord and start…
Khuram
  • 1,820
  • 1
  • 26
  • 33
6
votes
2 answers

WordPress schedule event not firing in set time

In WordPress, I am creating a plugin where I am sending emails to users. For that, I am using WordPress cron job. So basically what it will do is just send emails to users every hour. So my code looks like this public function __construct() { …
NewUser
  • 12,713
  • 39
  • 142
  • 236
6
votes
2 answers

Cron Job only specific months

I would like to set up a cron task to run a script every first day of every month except 1st january. How can I do that? Could I try something like that: 0 0 1 2-12 * ?
Francesco
  • 387
  • 5
  • 17
6
votes
1 answer

How-to check if Linux shell script is executed by a cronjob?

Is it possible to identify, if a Linux shell script is executed by a user or a cronjob? If yes, how can i identify/check, if the shell script is executed by a cronjob? I want to implement a feature in my script, that returns some other messages as…
checker284
  • 1,286
  • 3
  • 14
  • 29
6
votes
3 answers

Is it possible to increase the response timeout in Google App Engine?

On my local machine the script runs fine but in the cloud it 500 all the time. This is a cron task so I don't really mind if it takes 5min... < class 'google.appengine.runtime.DeadlineExceededError' >: Any idea whether it's possible to increase the…
rui
  • 11,015
  • 7
  • 46
  • 64
1 2
3
61 62