User:Laurier Rochon/notes/cronjobs

From XPUB & Lens-Based wiki

Setting up a cron job on the PZI server

some important ntoes...will flesh this out once I have time

  • ssh into pzwart3.wdka.hro.nl.gre.swa.sfeea.sds.as.sdasdad.asdad
  • crontab -e to open the editor in nano
  • every line goes like so : 'frequency' 'command' (note : command does not need the program/interperter)
  • ex : * * * * * /home/user/public_html/cgi-bin/script.cgi (the stars is minute hours dayofmonth month dayofweek) would run every minute the script in the url mentioned
  • make sure script is executable (chmod a+x script or chmod 755 script)
  • to remember : when the crontab runs that it's as if you were at the root of the directories. ex if /home/user/public_html/cgi-bin/script.cgi creates a file in the same directory, it will be done in /home/, not /cgi-bin/