how to set cronjob for 2 days? [closed]

From here: Cron also supports ‘step’ values. A value of */2 in the dom field would mean the command runs every two days and likewise, */5 in the hours field would mean the command runs every 5 hours. e.g. * 12 10-16/2 * * root backup.sh is the same as: * 12 10,12,14,16 * * … Read more

Bash script to run php script

If you have PHP installed as a command line tool (try issuing php to the terminal and see if it works), your shebang (#!) line needs to look like this: #!/usr/bin/php Put that at the top of your script, make it executable (chmod +x myscript.php), and make a Cron job to execute that script (same … Read more

Golang: Implementing a cron / executing tasks at a specific time

This is a general implementation, which lets you set: interval period hour to tick minute to tick second to tick UPDATED: (the memory leak was fixed) import ( “fmt” “time” ) const INTERVAL_PERIOD time.Duration = 24 * time.Hour const HOUR_TO_TICK int = 23 const MINUTE_TO_TICK int = 00 const SECOND_TO_TICK int = 03 type jobTicker … Read more

Execute PHP script in cron job

Automated Tasks: Cron Cron is a time-based scheduling service in Linux / Unix-like computer operating systems. Cron job are used to schedule commands to be executed periodically. You can setup commands or scripts, which will repeatedly run at a set time. Cron is one of the most useful tool in Linux or UNIX like operating … Read more