Category Archives: cron job

Run mysql connect in php on cron tab

run the following commands in terminal of ubantu:

1. crontab -e

2. Once it opens press i (for insert) and type the cron command.

3.  * * * * * /opt/lampp/bin/php -q /opt/lampp/htdocs/test1.php >> /home/a3logics/Desktop/log.txt

4. Press esc (escsape, you will taken out of insertion mode)

5. Press: :wq this will write (w) the file and quit (q), don’t forget the leading :


5. Press:  😡 to quit

6. Show the listing of crontab by command crontab -l

for more details:

Leave a comment

Posted by on Sep 13, 2011 in cron job


Tags: ,

%d bloggers like this: