crontab

Executing php with crontab

Hi everyone. I'm trying to run a php-script on a scheduled basis. So I'd thought crontab was a good idea. The server I'm using is on Linux which I'm not that familiar with. So the problem I'm having is, I don't know how make the script executable from php. I need to reference the script, or put it into a folder that can run php from the ...

libclntsh.so.11.1: cannot open shared object file.

I want to schedule a task on linux by icrontab, and the task is written in python and have to import cx_Oracle module, so I export ORACLE_HOME and LD_LIBRARY_PATH in .bash_profile, but it raise the error: libclntsh.so.11.1: cannot open shared object file. Since it is ok to run the task by issue the command in shell like python a.p...

storing crontab php outputs in a log file

* * * * * php /home/admin/public_html/domain.com/public/cron/route.php &>> /home/admin/public_html/domain.com/log/cron.log I have that cron running every minute. I want to store the errors that occur in route.php in cron.log This works wonderfully when I run : php /home/admin/public_html/domain.com/public/cron/route.php &>> /home/ad...

Use linux crontab in j2ee app

I have been using Quartz for over a year to schedule jobs in my app. I now have a new requirement to get rid of quarts, and instead use crontab. I have no experience in this area. How do I design something in my app that allows a job to be called by the operating system? Do I need to create a URL for each job that the OS can call? ...

script to generate crontab syntax from clean human-friendly input?

Is there a tool or scripting language that will allow me to create a crontab-syntax output after supplying a human-friendly specification or initialization file? For example: when: every 2 hours what: system('/path/to/flush_system_logs') when: 4:45pm every Wednesday what: system('/path/to/system_janitor_script') I would like to ...

cron stops running when processing multiple items

Cron stops running (no visible error) after a few hours when I add more than 5 jobs in my cron tab. Each job runs every minute. I tried putting all of my php jobs in a shell script and called this shell script instead but the same problem occurs. Cron stops running, no error in the log file, no error email sent out either. The PHP sc...

An agenda in Korn Shell: New / Edit / Delete / View appointment

As stated in the title, I have to write a simple script which should perform some typical agenda's functions. The script must use crontab. The functions are: Creating a new appointment Edit an existent appointment Delete an appointment List the appointment I really don't have a clue how to do this, can you help me with some hint? May...

Why does using set -e cause my script to fail when called in crontab?

I have a bash script that performs several file operations. When any user runs this script, it executes successfully and outputs a few lines of text but when I try to cron it there are problems. It seems to run (I see an entry in cron log showing it was kicked off) but nothing happens, it doesn't output anything and doesn't do any of its...

How to pass in password to pg_dump?

I'm trying to create a cronjob to back up my database every night before something catastrophic happens. It looks like this command should meet my needs: 0 3 * * * pg_dump dbname | gzip > ~/backup/db/$(date +%Y-%m-%d).psql.gz Except after running that, it expects me to type in a password. I can't do that if I run it from cron. How can...

Converting schedule definition into English

Trying not to invent wheels :) and thus I am looking for a way to convert schedule(such as say crontab format) into readable English, much like Google Calendar has. Is there something(preferably written in PHP) that could do that? ...

Calling python script from crontab with activate

how do i call a python script from crontab that requires using activate (source env/bin/active)? ...

why cygwin cron cannot find a file when cygwin ls can?

I got a cron job scheduled by using cygrunsrv and vixie's cron for cygwin. The job is a shell script that copies files from one directory to another and renames them. The script is in /home/martin/my/script/copy_files.sh. And the permission for the path is: drwxrwxrwt+ 1 martin root 0 2010-06-02 17:36 home drwxr-xr-x+ 1 martin...

Cron job execute backup.bash

Dear all, I wish to let cron executes delete_snapshot.bash, but when I try to create cron as below: */1 * * * * /var/www/mango_gis/delete_snapshot.bash >/dev/null It didn't execute my script at all, because when I didn't see it delete the snapshot in the amazon cloud, and my script is already tested with bash, it work fine. Here is my ...

How to test crontab entry?

I have an entry in my crontab that looks like this: 0 3 * * * pg_dump mydb | gzip > ~/backup/db/$(date +%Y-%m-%d).psql.gz That script works perfectly when I execute it from the shell, but it doesn't seem to be running every night. I'm assuming there's something wrong with the permissions, maybe crontab is running under a different use...

crontab and htaccess

Is it possible to execute from crontab a php file inside a folder which is protected with htaccess and how? ...

Why would my rake tasks running via cron get invoked twice?

I have a rails app with the whenever gem installed to setup cron jobs which invoke various rake tasks. For reasons unbeknownst to me, each rake task gets invoked twice at precisely the same time. So my db backup task backs up the db twice at 4:00am. Inspecting crontab reveals correct syntax for all of the cron jobs, so I don't think th...

Can't get Crontab to work

I've been trying to get crontab to work for a while but it doesnt seem to want to work. The python script I need to initialise every midnight works perfectly from the command terminal. The location of my python script is: /home/rv/ncbi-blast-2.2.23+/database_backup/backup.py My contab looks like this: SHELL=/bin/bash PATH=/sbin:/...

cron tab to restart my delayed_job server.

I want to create a cront tab to restart my delayed_job server if it breaks. how may check that my delayed_job server is running or not with ps command? how may i create a cron tab to check this thing work? Like if my server break than cron tab will restart it. I want to set cront tab to check it every 5 minute. ...

Crontab without crontab -e

Hi there! I would like to add a crontab schedule by doing this in my server: echo "30 * * * * /home/my/var/dir/to/script /var/etc/etc/etc/" > crontab -e Is there a way to do this without going doing crontab -e and then typing in the command? ...

cron job with CakePHP

Hello I have referred http://bakery.cakephp.org/articles/view/calling-controller-actions-from-cron-and-the-command-line and created cron_dispatcher.php and placed it in the app folder. I have return some test email function for the cron job to run in my users controller's test method. And i have created a Cron job in my web server's c...