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

How to render a view/template inside CakePHP Shell?

I'm running several cronjobs as CakePHP shells and I need to generate certain documents there. Some of them are HTMLs that are going to be converted to PDFs, some of them are email with HTML content. I have templates/views for these and I'm able to…
Ivan Petrushev
  • 182
  • 2
  • 13
0
votes
2 answers

"Visiting a page" using a cron job

So I have this php script that sends an email every time someone visits it the page (opens browser, types in www.example.com/email.php and hits enter). I'm trying to find a way to trigger this on a regular basis with a cron job on a shared host. I…
JoeMH
  • 11
  • 3
0
votes
1 answer

Start Akeeba Backup Using a Cron Job

we are using Akeeba Backup for backing up our Joomla website. It is possible to start a backup just by calling an URL as described here: https://www.akeebabackup.com/documentation/quick-start-guide/automating-the-backup.html. To automate the backup…
chrinetr
  • 205
  • 1
  • 3
  • 13
0
votes
1 answer

how to execute class functions using cron script

I am stuck in a cron script and need your help. My site is hosted on 1and1 server. I have written a cron script in php using class function structure. There are two scripts actually. Those are: 1) init.php 2) job.php In init.php i have written the…
Debashis
  • 566
  • 2
  • 14
  • 34
0
votes
1 answer

A script that never ends (with usleep) as an alternative for cron jobs - good idea?

I'm working on an open-source app that will be distributed to users on different hosts. Some of these hosts will have cron jobs disabled for whatever reason. Now personally, I think having a script that never ends using usleep(X) in a loop, as an…
user849137
0
votes
1 answer

directory structure for queued jobs (cron jobs) in zend framework

I found quite a few posts related to directory structure and cron jobs in Zend Framework, and yet no clear answer :( I have the following code to create a job that sends an email. Works perfectly as long as the script (emailNotification.php) is…
S D
  • 135
  • 1
  • 11
0
votes
1 answer

How to add Multiple cron job using php?

What i try to do > 1.User visit my PHP base Page 2.My page collect its data 3.Add cron job using PHP (Q1.How to add Cron job using PHP? ) (this type of cron job command currently i am using ""/usr/bin/wget myweb.org/some_directory/file.php?uid=2738…
Abdullah Adam
  • 178
  • 5
  • 19
0
votes
1 answer

function pointer with parameters in python?

I'm reading the docs from pythons Cron-job (Example 1): from apscheduler.scheduler import Scheduler # Start the scheduler sched = Scheduler() sched.start() def job_function(): print "Hello World" # Schedules job_function to be run on the…
Rafael T
  • 15,401
  • 15
  • 83
  • 144
0
votes
2 answers

How to send emails the same day but at differents times in Google App Engine for Python?

I use cron tasks to send mails to my app users every saturday at 9:00. But if there is a lot of users, is it a problem? If it is, what can I do to improve my code. Can I specify a cron task like "from 9:00 to 23:00" in order to be sure all users…
tsil
  • 2,069
  • 7
  • 29
  • 43
-1
votes
2 answers

python don´t excecute when start container with crontab

I try to execute a python when the container start. I use crontab in the container: crontab -l @reboot python3.10 /opt/django/manage.py runserver 0.0.0.0:8002 But when I stop and start container with portainer the python didn't execute
marcosam
  • 27
  • 9
-1
votes
1 answer

ansible vs cronjob for background job to label dynamic nodes

Need to change the labels of worker nodes with a predefined combination of alphanumeric characters (example: machine01) as and when they join the cluster (again and again if node(s) leave or when new nodes join the cluster). Is it possible to do it…
shaifali Gupta
  • 380
  • 1
  • 4
  • 16
-1
votes
1 answer

I am trying to figure out how to create a job that clicks a URL once a day

I have a URL, which calls some API and does some operations, I need this url to be clicked once a day. Can I use cron jobs, if so how? I tried the usual sites and methods, but they all make an API call. I need it to click my link. Any help is…
-1
votes
1 answer

How to use 2 strings for a command in crontab?

According to this one https://stackoverflow.com/a/51693399/16705688 2 strings are needed to schedule a cronjob every 36 hours How do I put them to run a command in crontab -e since usually it's 1 string per command
-1
votes
1 answer

Chron - [Permission Denied] when I try to save & remove file from directory

Issue: Unable to save file in directory (/root/Notion/Image) when using Cron schedule This is what my code is trying to do: Check email Download image attachment Store in a directory - root/Notion/Image Retrieve file path The script is working…
Thomas
  • 9
  • 3
-1
votes
1 answer

Cron every day at 2PM & 3PM

I'm trying to figure out how to set cron to run every day at 2PM & 3PM. Is this correct? The reason I'm asking is this is for a production server, so I need to be sure. 0 18,19 * * *
Rafsan Sadman
  • 195
  • 1
  • 1
  • 9