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

What is wrong with using $(date "+%Y-%m-%d_%H:%M:%S") in a cron job?

I am trying to sumbit a MySQL backup script through cpanel cron jobs panel, but I am receiving errors that I don't understand. I have tried the command on my Ubuntu mysqldump -u(USERNAME) -p(PASSWORD) --all-databases | gzip >…
Mohsen
  • 65
  • 1
  • 6
4
votes
4 answers

Setting Cron job to delete file after 24 hours

I read all the related questions and was unable to understand them. I am using Plesk CPanel to set cron job as it was advised by everyone. I want to delete all files from a folder after 24 hours. Assume that I have to delete it after every 2 mins…
user2290749
  • 53
  • 1
  • 3
  • 7
4
votes
2 answers

PHP script to check webserver status using a cron job

I'm looking for a PHP script that can be run as a cron job on my web host. It needs to run through a list of websites and check to make sure that each returns the Http response 200 OK. If a site doesn't return that response, or isn't available, it…
Dominic
  • 587
  • 3
  • 9
  • 19
4
votes
1 answer

How to check whether my server has assigned any cron job or not

Is it possible to check the list of cron jobs that has assigned to my server using putty or winscp or some other ways to check .Because I could find cron job tab in side my cpanel
RoSe
  • 447
  • 4
  • 7
  • 20
3
votes
1 answer

Python Apscheduler Loop Without Overlapping Tasks

I'm trying to work with Apscheduler to run 3 tasks sequentially, but I'm having a challenge figuring out how to prevent overlapping of tasks before the whole cycle is completed. import time from apscheduler.schedulers.blocking import…
CoderS
  • 143
  • 1
  • 8
3
votes
2 answers

User not allowed to use crontab

I want to edit cron tab daily to delete / add some jobs .. so I added cron job ( helper job ) to run php script to handle these edits. When I run this script by browser works fine .. but when it runs using the helper job not running and I receive…
Ahmed Gabr
  • 136
  • 3
  • 7
3
votes
1 answer

why cron job stoped in new year 2021 in laravel

every thing works fine till 31 decemeber 2020 and in new year my cron job stoped working i dont know what happend i am using spatie laravel package to take db backup an i also have one other cron job in console and…
Hamza Qureshi
  • 172
  • 2
  • 20
3
votes
1 answer

In which of these scenarios will my crontabs run, when won't they?

Beginner here. I have a few questions regarding crontabs, on mac / osx (if it makes a difference). I'd like to understand in what scenarios my crontab will run, and when it doesn't. I do know that this is true: When I turn off my computer, the…
Peter Goldhahn
  • 91
  • 1
  • 2
  • 6
3
votes
1 answer

unable to run R script in crontab in docker container

I'm trying to run a R script inside docker container. Here is the example. My working directory is like below. myRDocker -dockerfile -scripts -save_iris.R In the directory myRDocker, there is a dockerfile and a directory scripts, which…
zesla
  • 11,155
  • 16
  • 82
  • 147
3
votes
4 answers

Quartz Expression that runs every minute only once

I have this quartz cron expression: exp = "0 * * ? * *" that runs every minute. I use this expression as a trigger to call a HTTP POST method every minute. The problem is that it calls the post method multiple times. I need an expression that will…
Eraldo Forgoli
  • 65
  • 1
  • 3
  • 13
3
votes
2 answers

cron script won't reboot as it should

I have a Raspberry Pi connected to a VPN via openvpn. Periodically, the connection drops, so I use the following script: #!/bin/bash ps -ef | grep -v grep | grep openvpn if [ $? -eq 1 ] ; then /sbin/shutdown -r now fi I added it to crontab…
Brummbaer
  • 31
  • 4
3
votes
1 answer

Kubernetes CronJob public IP

I have simple Kubernetes CronJob connecting to a remote database. The remote database uses an IP filter, so each database connection should come from the same IP. Any thoughts on how to achieve this? Hint: I am using AKS (Azure).…
Tibor
  • 651
  • 1
  • 8
  • 18
3
votes
1 answer

Cron tasks quantum elixir

I want to execute a code every minute and I tried an attempt using the following code: #your_app/mix.exs defp deps do [{:quantum, ">= 1.9.1"}, #rest code end #your_app/mix.exs def application do [mod: {AppName, []}, …
Lety Cruz
  • 133
  • 1
  • 16
3
votes
1 answer

Cron job failing with firebase in google cloud app engine

I have used to below firebase blog link to execute a cron job on google cloud app engine for firebase functions but i am getting the below error. Firebase Blog link Please help.. 22:47:33.468 …
Mohammed Rampurawala
  • 3,033
  • 2
  • 22
  • 32