FAQ Database Discussion Community


Celery, AttributeError: 'module' object has no attribute 'celeryconfig'

python,celery,cron-task,celerybeat,periodic-task
I'm trying to setup a periodic-tasks via Python-Celery. Following is my project structure: proj/ proj/__init__.py proj/celeryconfig.py proj/celery.py proj/tasks.py celery.py from __future__ import absolute_import from celery import Celery # instantiate Celery object app = Celery( include=['proj.tasks']) # Optional configuration, see the application user guide. # import celery config file app.config_from_object('proj.celeryconfig') app.conf.update(...

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

node.js,process,cron,backgroundworker,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() { //Update database every minute here console.log('Update...

When a cron job is set to “run every 5 minutes”, does it run every 5 minutes from the moment it's added?

php,cron,cpanel,cron-task
When a cron job is set to "run every 5 minutes", does it run a) every 5 minutes from the moment it's added, or b) every 5 minutes from the zero-minute mark? For example, if a 5-minute cron job is added at 10:17, does it run as per schedule a):...

wp_schedule_event hook sheduled but not working

php,wordpress,cron,wordpress-plugin,cron-task
I'm trying to trigger cron job from WordPress Plugin that I'm writing (It's gonna take all new Products and export them to CSV every day) so the problem is that when I'm put this code in functions.php all working great and the code is valid but from the plugin folder...

Showcase website that will reinstall itself every day?

magento,cron,cron-task
I have built a showcase Magento installation that I am about to deploy public. I'd like to give people backend access but indeed I don't want their changes to stick - not sure how to go about this. What's the best way? I have seen a Magento showcase somewhere that...

Trying to get cron.php working in Cpanel for Magento

cron,cpanel,cron-task
I have been using this /usr/bin/php -q /home/username/public_html/sub.domain.com/cron.php as my command for the cron job, but I dont get anything. No customer emails, no errors, nothing. When I use php /home/username/public_html/sub.domain.com/cron.php I get the error (Or not error) X-Powered-By: PHP/5.4.37 Content-type: text/html and if I use /home/username/public_html/sub.domain.com/cron.php I get the...

admin crontab won't run sudo command

crontab,root,cron-task
sudo: no tty present and no askpass program specified Hi I am getting the above error when ever I try to get the following crontab to run. */5 * * * * sudo bash /home/admin/scripts/monitor.sh /dev/null 2>&1 I am using nano as the editor to edit the admin user crontab...

How do I run a specific shell script in a cron job?

oracle,csv,cron,crontab,cron-task
I have set up a cron job which will run a shell script to connect to our Oracle database and copy a table as a csv file. crontab -l outputs: */5 * * * * /home/user/import.sh > /home/user/importLog.txt import.sh looks like this: #!/bin/bash FILE="/path/to/application/TABLE.csv" sqlplus -s user/[email protected] <<EOF SET PAGESIZE...

Performing a Mass Equation Update on MySQL Tables

php,mysql,cron-task
There are a thousand ways I have seen to update all the rows on the Table to the same value, but how do I edit them all at once based on an equation? Basically I have a cron running that says every hour run a php, the php does nothing...

Rails Fetch record from instagram using cron job

ruby-on-rails,gem,instagram-api,cron-task
I am using instagram gem and I need to fetch users media from instagram using users instagram id. I already have instagram user id into users table. I have a few questions Does Instagram gem give any method which pass user id and fetch users media? How can I fetch...

Run Cronjob (or equivalent) in Rails 4 App for Continuous/repetitve Tasks

ruby-on-rails,ruby,ruby-on-rails-4,cron,cron-task
TASK I want to go through any new records inserted into the database (MySQL) and email them to a personal email address and then mark them as emailed when done. I'd like to do this via a custom written ruby/rails script that is ran via cron (or equivalent). Q What...

When does this cron job get executed?

unix,cron,cron-task,cronexpression
I see this cron setting in a crontab and I am curious as to when the script actually gets executed. 8 10 * * 6 expr `date +\%W` \% 2 == 1 >/dev/null || /path/to/script/scriptToRun.sh ...

How to install multiple cron jobs?

linux,shell,crontab,cron-task,cronexpression
the below code for installing multiple cron jobs at a same time using shellscript #!/bin/bash file="/home/admin/Desktop/crontab.sh" file1="/home/admin/Desktop/crontab1.sh" file2="/home/admin/Desktop/crontab2.sh" file3="/home/admin/Desktop/crontab3.sh" echo "$1 $2 $3 $4 $5 $file" >> cron.new echo "$6 $7 $8 $9 $10 $file1" >> cron.new echo "$11 $12 $3 $14 $15 $file2" >> cron.new echo "$16 $17 $18...

s3cmd not working as cron-task when echos/dates are added

amazon-web-services,amazon-s3,cron,cron-task,s3cmd
I have a Digital Ocean Droplet (VPS) running Ubuntu 14.04. I have installed s3cmd and am able to run a sync successfully with this command: s3cmd sync --recursive --preserve /srv s3://MY-BUCKET-NAME And if I put that same command in to a .sh to run as a cron-task every minute, it...