kc8yff 0 Report post Posted November 29, 2004 What are cron jobs? Share this post Link to post Share on other sites
jipman 0 Report post Posted November 29, 2004 Cron jobs are something like a task scheduler, you can tell the server to run a script every once in a while. Share this post Link to post Share on other sites
XeroTolerence 0 Report post Posted November 29, 2004 i heard that a cron job was something to do with a linux kernel. like u modify the kernel in an os... but that was from my little bro, so dont count on me Share this post Link to post Share on other sites
alizasa 0 Report post Posted November 29, 2004 Yes, there doesn't seem to be a whay to run a cron job from a windows environment. it seems that most cron jobs are php. does anyone know a way to run cron jobs from asp? Share this post Link to post Share on other sites
avalon1405241471 0 Report post Posted November 30, 2004 Cron jobs is a server side settings.You have to ask your server to give you permission to operate cron jobs.Cron jobs functions are easily available to non-windows servers.Most windows servers I had use before, do not support cron jobs. Share this post Link to post Share on other sites
whafizi 0 Report post Posted December 18, 2004 Can we set-up cron to execute system commands? for example, i want to set-up a cron job to delete contents of a temporary directory?anyone? Share this post Link to post Share on other sites
qwijibow 0 Report post Posted December 20, 2004 Yes... Cron jobs are something like a task scheduler, you can tell the server to run a script every once in a while.so your script would be somthing like#!/bin/bash#uncomment one of the following.#to delete a set directoryrm /path/to/temp/directory/* -R#to delete a tempory directory given in parameter 1#rm $1 -R i know you are a windows user, and thats a nix script, but this server is running on a nix system.for a windows system, replace "#!/bin/bash" with "@echo off" and "rm" with "del" Share this post Link to post Share on other sites
cryptwizard 0 Report post Posted December 22, 2004 Yes... so your script would be somthing like #!/bin/bash#uncomment one of the following.#to delete a set directoryrm /path/to/temp/directory/* -R#to delete a tempory directory given in parameter 1#rm $1 -R i know you are a windows user, and thats a nix script, but this server is running on a nix system.for a windows system, replace "#!/bin/bash" with "@echo off" and "rm" with "del" <{POST_SNAPBACK}> Slight improvision on the script to skip prompting in case it's enabled, since cronjobs can't interact: #!/bin/bashrm -fR /path/to/temp/directory/* Share this post Link to post Share on other sites
jcguy 0 Report post Posted December 23, 2004 You can set up cron jobs from your cpanel. I think it's under the Advanced Tools section. From there, you can enter the script to be run, then set the schedule, like once every 15 minutes for every day of the year, or once every day, or once every month, so on. Share this post Link to post Share on other sites
OpaQue 15 Report post Posted December 23, 2004 Can anyone just show an example of a script for both php and perl and guide us, how it is supposed to be entered in the Cron job thing in cpanel... I am also quite new to this thing.. Share this post Link to post Share on other sites
daniel151405241469 0 Report post Posted December 23, 2004 here's a php code that will recursively delete all the files in a directory. To call this from a cron job, make the cron job run 'GET http://forums.xisto.com/no_longer_exists/ > /dev/null'. If you write a script that outputs some stuff (such as a script i wrote that synchronizes my site on Xisto with the backup site on another host), make the cron job run 'GET http://forums.xisto.com/no_longer_exists/ > /home/yourusername/public_html/results.htm'. Then, whenever it runs, it will save the results into http://forums.xisto.com/no_longer_exists/ <?phpfunction deldir($dir){ $current_dir = opendir($dir); while($entryname = readdir($current_dir)){ if(is_dir("$dir/$entryname") and ($entryname != "." and $entryname!="..")){ deldir("${dir}/${entryname}"); }elseif($entryname != "." and $entryname!=".."){ unlink("${dir}/${entryname}"); } } closedir($current_dir); rmdir(${dir});}deldir("/path/to/temp/directory/");echo "Deletion complete";?> Share this post Link to post Share on other sites
sohahm 0 Report post Posted January 2, 2005 Can you tell me a website where I can learn Cron Jobs for different perposes?Sohail Ahmed Share this post Link to post Share on other sites
OpaQue 15 Report post Posted January 27, 2005 http://forums.xisto.com/topic/2324-topic/HERE IS A TUTORIAL WHICH I HAVE POSTED. HAVE A LOOK AT IT Share this post Link to post Share on other sites