Cron on XAMPP (Mac OS) - macos

I have installed XAMPP server on my Mac OS, how to setup a cron job on it?
My requirement is that i want to call a php script at regular intervals .
Thanks

there is a good article here how to setup cron job on Mac OS X
you would have to edit a textfile(crontabtaskfile)and add for example
0 */1 * * * php path/to/yourphp.php
this would give you a task running every hour (1:00, 2:00) .
and use crontab crontabtaskfile

Cronnix
http://code.google.com/p/cronnix/
or the command line for editing cron tabs.

Related

Cronjob for curator

I have installed ELK and the latest curator 4.0. I would like to made it regularly run with cronjob in linux.
I have installed .curator at the linux home, i.e. cd~.
I have typed crontab -e.
I input the following statement * * * * * /.curator curator action.yml
Is this setting right? How should I check if it is running or not?
1 - For curator installation checkout: https://www.elastic.co/guide/en/elasticsearch/client/curator/current/installation.html
2 - You can edit crontab entries like that. Thats OK.
3 - If you install curator correctly you can run:
* * * * * curator /path/to/action/file/action.yml
That will run curator every minute with the specified action.yml file.
For crontab log checkout: https://askubuntu.com/questions/56683/where-is-the-cron-crontab-log
You can also set a path for the log file in the configuration.
logging:
loglevel: INFO
logfile: /home/logs/curator.log
logformat: default

How to cron job setup in Amazon ec2

I have an Amazon EC2 instance running my website. I need to setup a Cron Job to run my file every 12hours.
if file setup via command line so please give a detail step wise.
Does anyone have any advise?
Thanks for your time.
I recently began using Amazon's linux distro on ec2 instances and after trying all kinds of things for cron all I needed was:
sudo service crond start
crontab -e
This allowed me to set a cron job as "ec2-user" without specifying the user. For example:
0 12 * * * python3 example.py
In fact, specifying a user here prevented it from running. I also posted this here.
It's just normal cron.
See: HowTo: Add Jobs To cron Under Linux or UNIX?

Script to run on logout per user in mac/Mavericks

I'm looking for a way to setup a list of script that run when I log out.
Basically, I want to write a server shutdown scripts for myself that will run automatically when a user log out or shut down per user logon. Able to start the server on logon via launchd. And how to shutdown server on logout.....
Env: Macbook pro 2010
OS version : OS X Version 10.9.2
Following link says that we cannot use logout script anymore :(
https://developer.apple.com/library/mac/documentation/macosx/conceptual/bpsystemstartup/chapters/CustomLogin.html

Raspberry Pi (RaspBMC) cronjobs not working

I have attempted adding cronjobs via SSH at /etc/crontab and also crontab -e. Neither one seems to work at all!
Activate cron jobs in Raspbmc
Per default running cron jobs is deactivated in Raspbmc and there are two ways to activate them.
- In the Raspbmc GUI under Programs -> Raspbmc Settings -> System Configuration -> Service Management -> Cronjob Scheduler
- Via SSH/FTP by modifying sys.service.cron value to “true” the settings file under /home//.xbmc/userdata/addon_data/script.raspbmc.settings/settings.xml
Since xbmc has been renamed to kodi (version 14.x), the new path is
/home/pi/.kodi/userdata/addon_data/script.raspbmc.settings/settings.xml

Amazon EC2 automatic reboot and script running

I'm trying to get a amazon ec2 instance to automatically reboot each 2 hours, and after run a shell (.sh) script on startup. Any ideas?
For rebooting after 2 hours, if it is Ubuntu (or Debian based distro) just put on root's cron (by entering sudo crontab -e):
* */2 * * * /sbin/shutdown -r now
I am very curious as to why you need to reboot every 2 hours... I hope this is not a production server... but you could run a cronjob to do the rebooting, what type of instance do you have, is it linux or windows?
I have a centos instance and I have modified /etc/rc.d/rc.local to run a script after booting up but then again you could easily run a script via cronjob to check whether something is running or not...
I guess we need more information from you as to what you are trying to do and what type of instance you have.

Resources