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
-1
votes
1 answer

How to know that .sh file content is executed in crontab

How to know that .sh file content is really executed in crontab ? For example : I have created .sh file and pasted a content "ping www.google.com" inside the file. I can check in /var/logs file that the crontab is executed and details, but, how to…
Rasool
  • 173
  • 2
  • 10
-1
votes
1 answer

Cron job Django Elastic Beanstalk

I am trying to set a cron job on my project to send a email after 15 minutes. This is in django.config 04_cronjb: command: "cat .ebextensions/cron-linux.config > /etc/cron.d/crontab && chmod 644 /etc/cron.d/crontab" leader_only: true This…
shivkhaira
  • 56
  • 1
  • 8
-1
votes
1 answer

Automate Linux tasks

I need to launch a command everytime I connect to internet and I was looking to find a way to automate it I looked on the crontab but it does't seem as far as I know to allow such automation There is any way to do this? I would appreciate your…
-1
votes
1 answer

NPM cronJob - dynamically set time

here is my code for scheduling a task. i have used separate routes for starting,stopping and changing the time as given below. please tell me if its correct. and also im getting an error for changing the time frequency.please help me. const…
-1
votes
1 answer

how to refresh doctrine connection multiple times during one script execution?

I need to execute Symfony command quite frequently (like every 5-10 seconds) but my runtime environement restricts the lowest time possible of cron trigger to 1 minute. So, I've come up with a pretty nasty solution, looks like this. I've had…
Arkadiusz Galler
  • 305
  • 3
  • 18
-1
votes
3 answers

How to make a bash file to run a python script every 2 hours?

I have in an virtualenvironment a python script that I wantt o run every 2 hours using a cronjob This is my python script: from selenium import webdriver from selenium.webdriver.common.keys import Keys import time PATH =…
-1
votes
1 answer

How can we run cron jobs for two different time intervals like - 5min, 5 min, 10 min, 5min, 5min, 10min

I have a script to run with cron in 5min for two times than in 10min... This sequence should be continued... like. 5,5,10,5,5,10,5,5,10..... How can we achieve this? Thanks
Iceman
  • 157
  • 1
  • 9
-1
votes
1 answer

Cronjob to check files modified on shared hosting

I need to check if my files are modified, if yes then copy from backup folder (restore the old file).
Wrathyimp
  • 7
  • 5
-1
votes
1 answer

PHP: scan directory, compress & overwrite images - script fails on production, produces just warnings on local

I have this code that is run as a cron task. Basically what it does (should) is go through a folder, find images that are larger than the specified size, rezise them and overwrite them. When testing it locally (using same 1300+ images) it works. If…
kopz
  • 738
  • 11
  • 20
-1
votes
1 answer

PHP script keeps "restarting" creating new instances of itself

I developed a site using Zend Framework 2. It is basically a price comparison site that integrates with many of the top affiliate networks out there. I wrote a script that checks prices from each affiliate network, and then updates my local DB with…
Cody
  • 1
  • 1
-1
votes
1 answer

Cron job executing twice at a time

I have set my cron job to be executed every 15 minutes. my cron job is */15 * * * * /usr/bin/python3.6 /home/ubuntu/main.py >> /tmp/file Above job will execute every 15 minutes and send the emails. But I receive two emails at one time. so I…
Sathiyakugan
  • 674
  • 7
  • 20
-1
votes
1 answer

Sheduling task in Spring

I build simply web application with Spring Boot but I need to create Sheduled task in Application that I create Cron job but dont working. That is my code for task: @Component public class CronService { @Autowired private XmlDeserializer…
Ivan Ivanov
  • 193
  • 3
  • 12
-1
votes
1 answer

Linux Cronjob does not execute

I created a cronjob with the command crontab -e: * * * * * (filename).sh This file test.sh should be executed every minute. But it doesn't work. I know that it is not the script because i did run bash (name of the file) it works so the crontad…
malik
  • 31
  • 6
-1
votes
1 answer

How to let users decide on a specific time delay for sending mail in PHP?

I have software built on Zend and in PHP. I am looking for a way to let each user choose the time delay before an appointment reminder email will be sent. For Example: User 1: Wants to send email 12 hours before event. User 2: Wants to send email 24…
-1
votes
2 answers

Directory: Is a directory

I've set up a cron job to run a Python script to scrape some web pages. /etc/crontab GNU nano 2.3.1 File: crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin …
oldboy
  • 5,729
  • 6
  • 38
  • 86