i know how to create and run cron job from inside the cpanel.
But how do you create and run cron job from php script without login into cpanel ??
Is it possibe that i create a cron job first by loggin in cpanel and set a php script to run at certain interval. Then afterwards i change the contents of the script so that it will again run as cron job ??
When you set a cron job in cpanel, it is just referencing a script file.
If you go and change the contents of that file to make the script do something else, then when the cron runs, it will do whatever you told the script to do. So yes you can edit the job script after it has been set without making any changes to the cron setup.