CentOS minimal template’s issue with crontab

How to, Tips and Tricks
On my CentOS 5.x 64bit XEN PV template (XEN PV is a virtualization type, this means I am talking about a VPS) doing 'crontab -e' gave me the following error [code] [root@vpsadmin ~]# crontab -e no crontab for root - using an empty one /bin/sh: /bin/vi: No such file or directory crontab: "/bin/vi" exited with status 127 [/code] To correct this issue, do the following [code] [root@vpsadmin ~]# touch ~/.bashrc [root@vpsadmin ~]# export VISUAL=nano [root@vpsadmin ~]# source ~/.bashrc [/code] So, now if you do 'crontab -e' it will work as it should [code] [root@vpsadmin ~]# crontab -e no crontab for root - using an empty one crontab: no changes made to crontab [/code]
Read More

Creating and Installing crontabs using CodeIgniter

How to, OpenSource, PHP, Resources, Reviews, Tips and Tricks, Tutorials
Last night, I was trying to get a crontab working in CodeIgniter, since my current project (a personal project) is using CodeIgniter now. I didn't wanted to use the conventional approach of running crontabs and my code seperate. Unfortunately, CodeIgniter does not have support for Crontabs and I didn't wanted to user wget in linux crontab to initiate unwanted requests. I spent some time and came up with a solution. It uses CodeIgniter backend Does not modify any core architecture of CodeIgniter Keeps configuration at one place So enough of the summary and let me show you how its done. Create a file (e.g. cron.php) in the same place as your index.php and system folder. Here is its code [php]/** * @author Asim Zeeshan * @web http://www.asim.pk/ * @date 13th…
Read More