Tentang Pasal ini
To setup a Windows machine to run cron.php at a specific time follow the specific instructions below. Untuk setup mesin Windows untuk menjalankan cron.php pada waktu tertentu ikuti instruksi khusus di bawah ini. This can be useful if you are not familiar with Linux/Unix, or if your web host does not offer the ability to run cron jobs; you can run them remotely from your own computer. Hal ini dapat berguna jika Anda tidak akrab dengan Linux / Unix, atau jika host web Anda tidak menawarkan kemampuan untuk menjalankan tugas cron, Anda dapat menjalankan mereka jarak jauh dari komputer Anda sendiri.Note: These instructions were written for Windows XP but should be similar in other versions of Windows. Catatan: petunjuk ini ditulis untuk Windows XP tetapi harus sama dalam versi lain dari Windows.
Creating a Scheduled Task Membuat Tugas Terjadwal
- Open Scheduler Buka Scheduler
- Go to Start > Programs > Accessories > System Tools > Scheduled Tasks Pergi ke Start> Programs> Accessories> System Tools> Scheduled Tasks
- Double-click Add Scheduled Task Klik dua kali Tambah Tugas Terjadwal
- The Scheduled Task Wizard will appear. The Scheduled Task Wizard akan muncul. Click Next . Klik Next.
- Select the program to run. Pilih program untuk dijalankan. Choose your browser from the list (for example, Internet Explorer or Mozilla Firefox). Pilih browser Anda dari daftar (misalnya, Internet Explorer atau Mozilla Firefox). Click Next . Klik Next.
- Give the task a Name , such as Drupal Cron Job , and choose the Frequency with which to perform the task (for example, Daily )). Berikan tugas Nama, seperti Drupal Cron Job, dan pilih Frekuensi yang dapat digunakan untuk melakukan tugas tersebut (misalnya, Harian)). Click Next . Klik Next.
- Choose specific date and time options (this step will vary, depending on the option selected in the previous step). Pilih tanggal tertentu dan opsi waktu (langkah ini akan bervariasi, tergantung pada pilihan yang dipilih di langkah sebelumnya). When finished, click Next . Setelah selesai, klik Next.
- Enter your password if prompted. Masukkan sandi Anda jika diminta. Change the username if required (for example, you'd like the task to run under a user with fewer privileges security reasons). Ubah nama pengguna jika diperlukan (misalnya, Anda ingin tugas untuk berjalan di bawah user dengan hak akses lebih sedikit alasan keamanan). Click Next . Klik Next.
- On the final page, select the checkbox Open advanced properties for this task when I click Finish and click Finish . Pada halaman terakhir, pilih kotak centang maju properti Terbuka untuk tugas ketika saya klik Finish dan klik Finish.
- Go to the task's setting page either by checking the checkbox at the end of the last step, or by double-clicking on the task. Pergi ke halaman pengaturan tugas yang baik dengan mencentang kotak centang di akhir langkah terakhir, atau dengan mengklik dua kali pada tugas.
- This method opens a browser window . Metode ini akan membuka jendela browser. In the Run box, after the text that is there now (for example, C:\PROGRA~1\MOZILL~1\firefox.exe ), enter a space and then type the address to your website's cron.php page in double quotations (for example, C:\PROGRA~1\MOZILL~1\firefox.exe http://www.example.com/cron.php Pada kotak Run, setelah teks yang ada sekarang (misalnya, C: \ progra ~ 1 \ MOZILL ~ 1 \ firefox.exe), masukkan spasi dan kemudian ketik alamat untuk cron.php's halaman situs Web Anda dalam kutipan ganda (misalnya, C: \ progra ~ 1 \ MOZILL ~ \ firefox.exe http://www.example.com/cron.php 1
- OR use this method if you do not want to open a brower window . In the Run box, after the text that is there now (for example, C:\PROGRA~1\xampp\php\php.exe ), enter a space and then type the address to your website's cron.php page in double quotations (for example, "C:\Progra~1\xampp\php\php.exe" C:\Progra~1\xampp\htdocs\yourwebsitel\cron.php This method opens your command window for moment. ATAU menggunakan metode ini jika Anda tidak ingin membuka jendela Brower). Pada Jalankan kotak, setelah teks yang ada sekarang (misalnya, C: \ progra ~ 1 \ xampp \ php \ php.exe, memasukkan spasi dan kemudian ketik alamat untuk cron.php's halaman website Anda dalam kutipan ganda (misalnya, "C: \ progra ~ 1 \ xampp \ php \ php.exe" C: \ progra ~ 1 \ xampp \ htdocs \ yourwebsitel \ cron. php Metode ini akan membuka jendela command Anda untuk sesaat.
- To set a frequency more often than Daily (for example, hourly), click the Schedule tab, then click Advanced . Untuk mengatur frekuensi lebih sering daripada harian (misalnya, per jam), klik tab Jadwal, kemudian klik Advanced. Here you can set options such as Repeat task, every 1 hour for 23 hours . Di sini Anda dapat mengatur pilihan seperti tugas Ulangi, setiap jam 1 selama 23 jam. Click Ok when finished. Klik Ok bila sudah selesai.
- Change the start time on the task to one minute from the current time . Mengubah waktu mulai pada tugas untuk satu menit dari waktu sekarang. This will allow you to test the task and make sure that it is working. Ini akan memungkinkan Anda untuk menguji tugas dan pastikan bahwa itu adalah bekerja.
- When all settings have been configured to your liking, click Apply and OK (note: you may be prompted for your password) Bila semua pengaturan telah dikonfigurasi dengan keinginan anda, klik Apply dan OK (catatan: Anda mungkin akan diminta untuk password anda)
Another way to perform the above commands is by using the schtasks (or at in Windows 2000) command from the command line. Cara lain untuk melakukan perintah di atas adalah dengan menggunakan schtasks (atau di dalam Windows 2000) perintah dari baris perintah. To duplicate the example above, which runs Firefox hourly to execute http://www.example.com/cron.php , open a command prompt ( Start > Programs > Accessories > Command Prompt ) and enter: Untuk menduplikasi contoh di atas, yang menjalankan Firefox jam untuk melaksanakan http://www.example.com/cron.php , buka command prompt (Start> Programs> Accessories> Command Prompt) dan masukkan:
schtasks /create /tn "Drupal Cron Job" /tr "C:\PROGRA~1\MOZILL~1\firefox.exe http://www.example.com/cron.php" /sc hourly Enter your password if prompted. Masukkan sandi Anda jika diminta.
Using wget for Windows to run cron Menggunakan wget untuk Windows untuk menjalankan cron
If for whatever reason you'd rather not deal with a browser window popping up on the machine, you can use wget, the Windows port of which works more or less the same as it does in UNIX. Jika untuk alasan apapun Anda tidak ingin berurusan dengan jendela browser muncul pada mesin, Anda bisa menggunakan wget, port Windows yang bekerja kurang lebih sama seperti dalam UNIX. curl and lynx also have windows ports but wget is probably the easiest to set up and use. curl dan lynx juga memiliki port jendela tapi wget mungkin yang paling mudah untuk mengatur dan digunakan.
Grab a copy of wget from your choice of either the author's site or from SourceForge . Ambil salinan wget dari pilihan Anda dari salah satu penulis situs atau dari SourceForge . Install it to the location of your choice. Instal ke lokasi pilihan Anda.
Follow the steps for Creating A Scheduled Task above, except select wget.exe as the program to run (you may need to click the Browse button to locate it if you installed from a .zip file, for example). Ikuti langkah-langkah untuk Membuat Tugas Terjadwal di atas, kecuali wget.exe pilih sebagai program untuk menjalankan (Anda mungkin perlu klik tombol Browse untuk mencari jika Anda menginstal dari sebuah, zip file. Misalnya). When you get to the Advanced Properties dialog, paste in the following after the program path: Ketika anda masuk ke dialog Properties Advanced, paste pada berikut setelah jalur program:
-O - -q -t 1 http://www.example.com/cron.php Adjust the rest of the options as described above and test it. Sesuaikan sisa dari pilihan seperti dijelaskan di atas dan coba.

0 Komentar
Sedikit komentar ataupun meninggalkan coretan akan sangat berarti bagi kami dan kami sangat berterima kasih atas waktunya.