How can I set cron job through PHP script.
Do you know how to set a cron job normally? (outside of PHP, i.e. from a bash script or the command line).
If so, you just need to use the php function exec to issue the same commands you would have to create the cron job at the command line. One caveat is that there may be permission issues and you have to be really careful about what you put in that exec function (you don't want to pass input from the end user to that function).